neubig / lamtram

lamtram: A toolkit for neural language and translation modeling
GNU Lesser General Public License v2.1
138 stars 37 forks source link

Core dumped when saving the model to a file #25

Open aldcool opened 7 years ago

aldcool commented 7 years ago

I was trying to use lamtram to train an encoder-decoder model from Chinese to English. However, when completing the first epoch and saving the model to a file, a runtime error will be always thrown out: terminate called after throwing an instance of 'std::runtime_error' what(): ERROR: Could not open output file: models/encdec.mod

The command used is: ./src/lamtram/lamtram-train --model_type encdec --train_src data/train.zh --train_trg data/train.en --trainer sgd --learning_rate 0.1 --rate_decay 1.0 --epochs 10 --model_out models/encdec.mod --minibatch_size 80 --dynet_mem 3096

Please help me with this issue. Thanks.

neubig commented 7 years ago

Try mkdir models before running lamtram.

aldcool commented 7 years ago

Hi Neubig,

Thanks for your kind reply. I created the folder models before running lamtram. After the first epoch, I can see encdec.mod in the folder , but I still get the error listed above.

liesun1994 commented 7 years ago

seems very interesting , any problems now? maybe I can help u.

neubig commented 7 years ago

Hmm, has this bug resolved itself? It's a rather puzzling one, as it should just work.

liesun1994 commented 7 years ago

I think the problem occurs that you had not add dev_src and dev_trg in your command .

antonisa commented 7 years ago

For what might be worth, I have had this happen on other models that use DyNet (core dumped when saving a model). So it might be a DyNet issue, and not a lamtram issue.