Error when using eval.py on pretrained models: size mismatch for module.output_conv.conv.weight: copying a param with shape torch.Size([3, 448, 3, 3]) from checkpoint, the shape in current model is torch.Size([3, 640, 3, 3]). #38
I am just trying your pre-trained models.
This commands works fine for me:
python eval.py --model './DBPNLL_x8.pth'
But using any other model, with or without changing the parameter "upscale_factor" leads to an error:
python eval.py --upscale_factor 4 --model './DBPN_x4.pth'
or
python eval.py --model './DBPN_x4.pth'
or
python eval.py --model './DBPN_x8.pth'
==>
RuntimeError: Error(s) in loading state_dict for DataParallel:
Missing key(s) in state_dict: "module.down7.conv.conv.weight", "module.down7.conv.conv.bias", "module.down7.conv.act.weight", "module.down7.down_conv1.conv.weight", "module.down7.down_conv1.conv.bias", "module.down7.down_conv1.act.weight", "module.down7.down_conv2.deconv.weight", "module.down7.down_conv2.deconv.bias", "module.down7.down_conv2.act.weight", "module.down7.down_conv3.conv.weight", "module.down7.down_conv3.conv.bias", "module.down7.down_conv3.act.weight", "module.up8.conv.conv.weight", "module.up8.conv.conv.bias", "module.up8.conv.act.weight", "module.up8.up_conv1.deconv.weight", "module.up8.up_conv1.deconv.bias", "module.up8.up_conv1.act.weight", "module.up8.up_conv2.conv.weight", "module.up8.up_conv2.conv.bias", "module.up8.up_conv2.act.weight", "module.up8.up_conv3.deconv.weight", "module.up8.up_conv3.deconv.bias", "module.up8.up_conv3.act.weight", "module.down8.conv.conv.weight", "module.down8.conv.conv.bias", "module.down8.conv.act.weight", "module.down8.down_conv1.conv.weight", "module.down8.down_conv1.conv.bias", "module.down8.down_conv1.act.weight", "module.down8.down_conv2.deconv.weight", "module.down8.down_conv2.deconv.bias", "module.down8.down_conv2.act.weight", "module.down8.down_conv3.conv.weight", "module.down8.down_conv3.conv.bias", "module.down8.down_conv3.act.weight", "module.up9.conv.conv.weight", "module.up9.conv.conv.bias", "module.up9.conv.act.weight", "module.up9.up_conv1.deconv.weight", "module.up9.up_conv1.deconv.bias", "module.up9.up_conv1.act.weight", "module.up9.up_conv2.conv.weight", "module.up9.up_conv2.conv.bias", "module.up9.up_conv2.act.weight", "module.up9.up_conv3.deconv.weight", "module.up9.up_conv3.deconv.bias", "module.up9.up_conv3.act.weight", "module.down9.conv.conv.weight", "module.down9.conv.conv.bias", "module.down9.conv.act.weight", "module.down9.down_conv1.conv.weight", "module.down9.down_conv1.conv.bias", "module.down9.down_conv1.act.weight", "module.down9.down_conv2.deconv.weight", "module.down9.down_conv2.deconv.bias", "module.down9.down_conv2.act.weight", "module.down9.down_conv3.conv.weight", "module.down9.down_conv3.conv.bias", "module.down9.down_conv3.act.weight", "module.up10.conv.conv.weight", "module.up10.conv.conv.bias", "module.up10.conv.act.weight", "module.up10.up_conv1.deconv.weight", "module.up10.up_conv1.deconv.bias", "module.up10.up_conv1.act.weight", "module.up10.up_conv2.conv.weight", "module.up10.up_conv2.conv.bias", "module.up10.up_conv2.act.weight", "module.up10.up_conv3.deconv.weight", "module.up10.up_conv3.deconv.bias", "module.up10.up_conv3.act.weight".
size mismatch for module.output_conv.conv.weight: copying a param with shape torch.Size([3, 448, 3, 3]) from checkpoint, the shape in current model is torch.Size([3, 640, 3, 3]).
Hi,
I am just trying your pre-trained models. This commands works fine for me: python eval.py --model './DBPNLL_x8.pth'
But using any other model, with or without changing the parameter "upscale_factor" leads to an error: python eval.py --upscale_factor 4 --model './DBPN_x4.pth' or python eval.py --model './DBPN_x4.pth' or python eval.py --model './DBPN_x8.pth'
==> RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.down7.conv.conv.weight", "module.down7.conv.conv.bias", "module.down7.conv.act.weight", "module.down7.down_conv1.conv.weight", "module.down7.down_conv1.conv.bias", "module.down7.down_conv1.act.weight", "module.down7.down_conv2.deconv.weight", "module.down7.down_conv2.deconv.bias", "module.down7.down_conv2.act.weight", "module.down7.down_conv3.conv.weight", "module.down7.down_conv3.conv.bias", "module.down7.down_conv3.act.weight", "module.up8.conv.conv.weight", "module.up8.conv.conv.bias", "module.up8.conv.act.weight", "module.up8.up_conv1.deconv.weight", "module.up8.up_conv1.deconv.bias", "module.up8.up_conv1.act.weight", "module.up8.up_conv2.conv.weight", "module.up8.up_conv2.conv.bias", "module.up8.up_conv2.act.weight", "module.up8.up_conv3.deconv.weight", "module.up8.up_conv3.deconv.bias", "module.up8.up_conv3.act.weight", "module.down8.conv.conv.weight", "module.down8.conv.conv.bias", "module.down8.conv.act.weight", "module.down8.down_conv1.conv.weight", "module.down8.down_conv1.conv.bias", "module.down8.down_conv1.act.weight", "module.down8.down_conv2.deconv.weight", "module.down8.down_conv2.deconv.bias", "module.down8.down_conv2.act.weight", "module.down8.down_conv3.conv.weight", "module.down8.down_conv3.conv.bias", "module.down8.down_conv3.act.weight", "module.up9.conv.conv.weight", "module.up9.conv.conv.bias", "module.up9.conv.act.weight", "module.up9.up_conv1.deconv.weight", "module.up9.up_conv1.deconv.bias", "module.up9.up_conv1.act.weight", "module.up9.up_conv2.conv.weight", "module.up9.up_conv2.conv.bias", "module.up9.up_conv2.act.weight", "module.up9.up_conv3.deconv.weight", "module.up9.up_conv3.deconv.bias", "module.up9.up_conv3.act.weight", "module.down9.conv.conv.weight", "module.down9.conv.conv.bias", "module.down9.conv.act.weight", "module.down9.down_conv1.conv.weight", "module.down9.down_conv1.conv.bias", "module.down9.down_conv1.act.weight", "module.down9.down_conv2.deconv.weight", "module.down9.down_conv2.deconv.bias", "module.down9.down_conv2.act.weight", "module.down9.down_conv3.conv.weight", "module.down9.down_conv3.conv.bias", "module.down9.down_conv3.act.weight", "module.up10.conv.conv.weight", "module.up10.conv.conv.bias", "module.up10.conv.act.weight", "module.up10.up_conv1.deconv.weight", "module.up10.up_conv1.deconv.bias", "module.up10.up_conv1.act.weight", "module.up10.up_conv2.conv.weight", "module.up10.up_conv2.conv.bias", "module.up10.up_conv2.act.weight", "module.up10.up_conv3.deconv.weight", "module.up10.up_conv3.deconv.bias", "module.up10.up_conv3.act.weight". size mismatch for module.output_conv.conv.weight: copying a param with shape torch.Size([3, 448, 3, 3]) from checkpoint, the shape in current model is torch.Size([3, 640, 3, 3]).
Thank you in advance for your help.