alterzero/RBPN-PyTorch

Unable to use RBPN_4x_F11_NTIRE2019 pretrained model: size mismatch for module.output.conv.weight

skerit opened this issue · 1 comments

When I try to load the RBPN_4x_F11_NTIRE2019.pth pretrained model I get this error:

Traceback (most recent call last):
  File "eval.py", line 96, in <module>
    model.load_state_dict(model_state_dict)
  File "/home/skerit/projects/miniconda3/envs/py35/lib/python3.5/site-packages/torch/nn/modules/module.py", line 777, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
	size mismatch for module.output.conv.weight: copying a param with shape torch.Size([3, 640, 3, 3]) from checkpoint, the shape in current model is torch.Size([3, 384, 3, 3]).

I have no idea where either 640 or 384 is defined in the eval.py script, so I'm drawing a blank here

@skerit you should change line 35 in eval.py to parser.add_argument('--nFrames', type=int, default=11)

Thanks