clab / lstm-parser

Transition-based dependency parser based on stack LSTMs
Apache License 2.0
204 stars 63 forks source link

Serialization error while testing a trained model #27

Closed sb-b closed 6 years ago

sb-b commented 6 years ago

Hi,

I have trained a parser model for Turkish. When I attempt to test this model with test data, I get the following error:

lstm-parse: /home/betul/lstm-parser/lstm-parser/cnn/cnn/model.h:92: void cnn::LookupParameters::load(Archive&, unsigned int) [with Archive = boost::archive::text_iarchive]: Assertionnv == (int)values.size()' failed. Aborted ` Do you have any idea why this error is shown?

Thanks,

Betul

miguelballesteros commented 6 years ago

Hi! Are you sure you passed the correct location of the parameter file through -m?

sb-b commented 6 years ago

Hi,

I used the command given in README file:

parser/lstm-parse -T trainingOracle.txt -d testOracle.txt --hidden_dim 100 --lstm_input_dim 100 -w sskip.100.vectors --pretrained_dim 100 --rel_dim 20 --action_dim 20 -P -m parser_pos_2_32_100_20_100_12_20-pidXXXX.params

with my own word embeddings file and the trained .params file. I checked the path of these files and they are correct.

miguelballesteros commented 6 years ago

Hmm I'm not sure then. It should work. Are you sure that that params file is not empty? Are you using the same boost version for training and decoding ?

sb-b commented 6 years ago

I found that there was a problem with the embedding file. It runs perfectly now. Thank you.