shubhamagarwal92 / mmd

This repository contains the Pytorch implementation for our SCAI (EMNLP-2018) submission "A Knowledge-Grounded Multimodal Search-Based Conversational Agent"
29 stars 5 forks source link

dimensions mismatch error in translate.py #15

Closed Shandilya21 closed 5 years ago

Shandilya21 commented 5 years ago

@githwd2016 @shubhamagarwal92 I have trained the model and save the checkpoint. whereas I am trying to run again bash train_and _translate.sh with IS TRAIN to 'No', which means for translation, I got following error: can anybody help me to rectify this:

File "translate.py", line 212, in main(args) File "translate.py", line 139, in main model.load_state_dict(torch.load(args.checkpoint_path)) File "/home/mauajamapcs16/anaconda2/envs/mmd/lib/python2.7/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for MultimodalHRED: While copying the parameter named "context_encoder.contextRNN.weight_ih_l0", whose dimensions in the model are torch.Size([1536, 768]) and whose dimensions in the checkpoint are torch.Size([1536, 1024]).

Thanks in advance ..