NTIRE-2018-Dehazing-Challenge
NTIRE-2018-Dehazing-Challenge copied to clipboard
RuntimeError: Error(s) in loading state_dict for Dense_rain_cvprw3
I got back another running error as follows:
Traceback (most recent call last):
File "dehazetest1.py", line 109, in <module>
netG.load_state_dict(torch.load(opt.netG))
File "/home/lyh/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Dense_rain_cvprw3:
Missing key(s) in state_dict: "dense_block1.denselayer1.norm1.weight", ......
It seems that Dense_rain_cvprw3
in the file models/dehaze1113.py
is not successfully loaded with the code netG=net.Dense_rain_cvprw3()
in the file dehazetest.py
Which version of pytorch are you using? I guess pytorch 0.3.1 should work well
My pytorch version is 0.4.1, maybe some changes in this version caused this error while running your code.
I encountered this problem too. My pytorch version is 0.3.1.
Traceback (most recent call last):
File "dehazetest1.py", line 109, in
I am getting the same error as well, using pytorch 0.4.1. what should be done to solve it?