Training from a checkpoint (Loading a pretrained model) in OpenNMT

I am facing an issue when I try to train OpenNMT from a pretrained model (

Following is the error I get :

$python -data data/ -train_from=“” -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/’, 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=‘’, train_from_state_dict=’’, word_vec_size=500)
Loading data from 'data/’
Loading dicts from checkpoint at

  • vocabulary size. source = 25004; target = 25004
  • number of training sentences. 2984
  • maximum batch size. 64
    Building model…
    Loading model from checkpoint at
    Traceback (most recent call last):
    File “”, line 353, in
    File “”, 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?