ValueError: Invalid input feature sizes
indiclinguist opened this issue · comments
I used the following command:
deep-crf predict input_file_multi.txt --delimiter=' ' --input_idx 0,1 --output_idx 2 --model_filename ./save_model_dir/bilstm-cnn-crf_multi_epoch3.model --save_dir save_model_dir --save_name bilstm-cnn-crf_multi --predicted_output predicted.txt
and I am getting the following error:
ValueError: Invalid input feature sizes: "7". Please check at line [3]
The training and dev data files are in CoNLL format. Can anyone help?
Thanks in advance.
Can you tell me the following result?
$ head -n 10 input_file_multi.txt
Please check that your file input_file_multi.txt
contains three features (two input and one output).
(Example)
Barack NN B−PERSON
Hussein NN I−PERSON
Obama NN E−PERSON
is VBZ O
a DT O
man NN O
. . O
Please check that the delimiter is space? (since you set --delimiter=' '
).
Hello,
The delimiter is a white-space. This is the result that you asked for.
$ head -n 10 data/train_multi.txt
Barack NN B−PERSON
Hussein NN I−PERSON
Obama NN E−PERSON
is VBZ O
a DT O
man NN O
. . O
Yuji NN B−PERSON
Matsumoto NN E−PERSON
$
Thanks
Did you use following the command?
deep-crf predict input_file_multi.txt --delimiter=' ' --input_idx 0,1 --output_idx 2 --model_filename ./save_model_dir/bilstm-cnn-crf_multi_epoch3.model --save_dir save_model_dir --save_name bilstm-cnn-crf_multi --predicted_output predicted.txt
I want to see input_file_multi.txt
.
or Did you use data/train_multi.txt
?
the test-input file format was wrong. now it works.