VioletPeng / GraphLSTM_release

Implementation of TACL 2017 paper: Cross-Sentence N-ary Relation Extraction with Graph LSTMs. Nanyun Peng, Hoifung Poon, Chris Quirk, Kristina Toutanova and Wen-tau Yih.
60 stars 19 forks source link

TypeError: 'str' object is not callable #4

Open juliachen123 opened 3 years ago

juliachen123 commented 3 years ago

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!
tianzhaoning commented 2 years ago

I also have this question,have you solved it?