I use this command "python ../main.py extract --model model.NER --corpus data/rawdata --output result
", but turns out to be an exception:
Traceback (most recent call last):
File "../main.py", line 288, in
main(args)
File "../main.py", line 116, in main
ens = model.extract(data)
File "/home/t/th/chineseNER/KG/NERmodel.py", line 107, in extract
tags, _ = self.get_best_seq(ins[0])
File "/home/t/th/chineseNER/KG/LSTM.py", line 99, in get_best_seq
tags, logp = self.evafunc(x)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 786, in call
allow_downcast=s.allow_downcast)
File "/usr/local/lib/python2.7/dist-packages/theano/tensor/type.py", line 177, in filter
data.shape))
TypeError: ('Bad input argument to theano function with name "/home/t/th/chineseNER/KG/LSTM.py:90" at index 0(0-based)', 'Wrong number of dimensions: expected 1, got 0 with shape ().')
I slightly change your code to debug, so maybe line number is not exactly matched, it seems input should be sequence?
I use this command "python ../main.py extract --model model.NER --corpus data/rawdata --output result ", but turns out to be an exception:
I slightly change your code to debug, so maybe line number is not exactly matched, it seems input should be sequence?