Hi all,
I have trained a model two months ago. Now, I want to start retraining it for a few more epochs. But it comes up with the following error.
Here is what I get in the output:
Loading train data from ‘/home/preprocesses_new’
- number of train sentences: 4544648
Loading valid data from ‘/home/preprocesses_new’ - number of valid sentences: 2732
- maximum batch size: 64
Loading checkpoint from /home/models/de-en_BPE_param_exp_acc_59.97_ppl_11.00_e9.pt
Traceback (most recent call last):
File “/home/projects/opennmt/OpenNMT-py/train.py”, line 349, in
main()
File “/home/projects/opennmt/OpenNMT-py/train.py”, line 330, in main
fields = load_fields(train_dataset, valid_dataset, checkpoint)
File “/home/projects/opennmt/OpenNMT-py/train.py”, line 241, in load_fields
torch.load(opt.data + ‘.vocab.pt’), data_type)
File “/home/projects/opennmt/OpenNMT-py/onmt/io/IO.py”, line 61, in load_fields_from_vocab
fields[k].vocab = v
TypeError: ‘NoneType’ object has no attribute ‘getitem’
Note that I have pulled the latest version just yesterday. I think it is because of using two different versions for the original training and retraining. However, the question is how I can fix it.
Best,
Hamid