Skip to content

TypeError: 'str' object is not callable #4

@juliachen123

Description

@juliachen123

Hi, I've got a question regarding theano_src/train_util.py line 495.

I was trying to replicate the results in the paper with batch_run_lstm.sh. It returned that str object is not callable. Here's the traceback:

  File "theano_src/lstm_RE.py", line 707, in <module>
    eval(args.setting)(args)
  File "theano_src/lstm_RE.py", line 604, in run_single_corpus
    run_epochs(_args) 
  File "theano_src/lstm_RE.py", line 297, in run_epochs
    cargs = compile_circuit(_args)
  File "theano_src/lstm_RE.py", line 248, in compile_circuit
    (_args.f_cost, _args.f_update, _args.f_classify, cargs) = create_relation_circuit(_args, StackConfig)
  File "/home/julia/Desktop/GraphLSTM_release/theano_src/train_util.py", line 495, in create_relation_circuit
    x_w, mask, idx_arr, y, y_pred, cost, grads, regularizable_params = _args.circuit(cargs)
TypeError: 'str' object is not callable
Command exited with non-zero status 1```


I suspect that the argument `Relation` for `run_lstm.sh` is passed as string. I am wondering if you could elaborate this? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions