RuntimeError                              Traceback (most recent call last)
 in ()
1 model = CaptionModel_B(2048, 50, 160, vocab_size, num_layers=1)
----> 2 model.load_state_dict(torch.load(‘im_caption_35.727_0.316_epoch_20.pth.tar’, map_location=‘cpu’))
3 solver = NetSolver(data, model)
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
843         if len(error_msgs) > 0:
844             raise RuntimeError(‘Error(s) in loading state_dict for {}:\n\t{}’.format(
–> 845                                self.class.name, “\n\t”.join(error_msgs)))
846         return _IncompatibleKeys(missing_keys, unexpected_keys)
847
RuntimeError: Error(s) in loading state_dict for CaptionModel_B:
size mismatch for rnn.embed.weight: copying a param with shape torch.Size([9080, 50]) from checkpoint, the shape in current model is torch.Size([8947, 50]).
size mismatch for rnn.linear.weight: copying a param with shape torch.Size([9080, 160]) from checkpoint, the shape in current model is torch.Size([8947, 160]).
size mismatch for rnn.linear.bias: copying a param with shape torch.Size([9080]) from checkpoint, the shape in current model is torch.Size([8947]).
Can you help me to solve this error?