Hi,
I am facing an issue when I try to train OpenNMT from a pretrained model (https://github.com/OpenNMT/OpenNMT-py/blob/master/train.py 30)
Following is the error I get :
$python train.py 1 -data data/5kprocessed.train.pt -train_from=“50kcycle2_model_acc_31.18_ppl_99.08_e50.pt” -save_model 50kcycle2_finetuned -learning_rate=0.5 -brnn -epochs=500 -gpus 0
Namespace(batch_size=64, brnn=True, brnn_merge=‘concat’, curriculum=False, data=‘data/5kprocessed.train.pt’, dropout=0.5, epochs=500, extra_shuffle=False, gpus=[0], input_feed=1, layers=4, learning_rate=0.5, learning_rate_decay=0.5, log_interval=50, max_generator_batches=64, max_grad_norm=5, optim=‘sgd’, param_init=0.1, pre_word_vecs_dec=None, pre_word_vecs_enc=None, rnn_size=1024, save_model=‘50kcycle2_finetuned’, start_decay_at=8, start_epoch=1, train_from=‘50kcycle2_model_acc_31.18_ppl_99.08_e50.pt’, train_from_state_dict=’’, word_vec_size=500)
Loading data from 'data/5kprocessed.train.pt’
Loading dicts from checkpoint at 50kcycle2_model_acc_31.18_ppl_99.08_e50.pt

vocabulary size. source = 25004; target = 25004
number of training sentences. 2984
maximum batch size. 64
Building model…
Loading model from checkpoint at 50kcycle2_model_acc_31.18_ppl_99.08_e50.pt
Traceback (most recent call last):
File “train.py 1”, line 353, in 
main()
File “train.py 1”, line 302, in main
generator_state_dict = chk_model.generator.state_dict()
AttributeError: ‘dict’ object has no attribute ‘generator’

Any inputs what’s causing this?