(mypytorch) F:\NeuralNLP-NeuralClassifier-master>python eval.py conf/train.json
Traceback (most recent call last):
File "eval.py", line 113, in
eval(config)
File "eval.py", line 77, in eval
load_checkpoint(conf.eval.model_dir, conf, model, optimizer)
File "eval.py", line 56, in load_checkpoint
model.load_state_dict(checkpoint["state_dict"])
File "F:\Anaconda\envs\mypytorch\lib\site-packages\torch\nn\modules\module.py", line 1407, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for TextRCNN:
Missing key(s) in state_dict: "rnn.rnn.weight_ih_l0", "rnn.rnn.weight_hh_l0", "rnn.rnn.bias_ih_l0", "rnn.rnn.bias_hh_l0", "rnn.rnn.weight_ih_l0_reverse", "rnn.rnn.weight_hh_l0_reverse", "rnn.rnn.bias_ih_l0
_reverse", "rnn.rnn.bias_hh_l0_reverse".
size mismatch for convs.0.weight: copying a param with shape torch.Size([100, 64, 2]) from checkpoint, the shape in current model is torch.Size([100, 128, 2]).
size mismatch for convs.1.weight: copying a param with shape torch.Size([100, 64, 3]) from checkpoint, the shape in current model is torch.Size([100, 128, 3]).
size mismatch for convs.2.weight: copying a param with shape torch.Size([100, 64, 4]) from checkpoint, the shape in current model is torch.Size([100, 128, 4]).
(mypytorch) F:\NeuralNLP-NeuralClassifier-master>python eval.py conf/train.json Traceback (most recent call last): File "eval.py", line 113, in
eval(config)
File "eval.py", line 77, in eval
load_checkpoint(conf.eval.model_dir, conf, model, optimizer)
File "eval.py", line 56, in load_checkpoint
model.load_state_dict(checkpoint["state_dict"])
File "F:\Anaconda\envs\mypytorch\lib\site-packages\torch\nn\modules\module.py", line 1407, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for TextRCNN:
Missing key(s) in state_dict: "rnn.rnn.weight_ih_l0", "rnn.rnn.weight_hh_l0", "rnn.rnn.bias_ih_l0", "rnn.rnn.bias_hh_l0", "rnn.rnn.weight_ih_l0_reverse", "rnn.rnn.weight_hh_l0_reverse", "rnn.rnn.bias_ih_l0
_reverse", "rnn.rnn.bias_hh_l0_reverse".
size mismatch for convs.0.weight: copying a param with shape torch.Size([100, 64, 2]) from checkpoint, the shape in current model is torch.Size([100, 128, 2]).
size mismatch for convs.1.weight: copying a param with shape torch.Size([100, 64, 3]) from checkpoint, the shape in current model is torch.Size([100, 128, 3]).
size mismatch for convs.2.weight: copying a param with shape torch.Size([100, 64, 4]) from checkpoint, the shape in current model is torch.Size([100, 128, 4]).