Traceback (most recent call last):
File "D:\Study\software files\bishe\crnn-pytorch-master\demo.py", line 29, in
model.load_state_dict(torch.load(model_path))
File "D:\Study\software\anaconda\envs\yolo\lib\site-packages\torch\nn\modules\module.py", line 1497, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for CRNN:
size mismatch for rnn.1.embedding.weight: copying a param with shape torch.Size([37, 512]) from checkpoint, the shape in current model is torch.Size([119, 512]).
size mismatch for rnn.1.embedding.bias: copying a param with shape torch.Size([37]) from checkpoint, the shape in current model is torch.Size([119]).
this code is in train.py. i do not understand where is wrong. thanks
Traceback (most recent call last): File "D:\Study\software files\bishe\crnn-pytorch-master\demo.py", line 29, in
model.load_state_dict(torch.load(model_path))
File "D:\Study\software\anaconda\envs\yolo\lib\site-packages\torch\nn\modules\module.py", line 1497, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for CRNN:
size mismatch for rnn.1.embedding.weight: copying a param with shape torch.Size([37, 512]) from checkpoint, the shape in current model is torch.Size([119, 512]).
size mismatch for rnn.1.embedding.bias: copying a param with shape torch.Size([37]) from checkpoint, the shape in current model is torch.Size([119]).
this code is in train.py. i do not understand where is wrong. thanks