Yang-Liu1082 / InvDN

Implementation for the paper: Invertible Denoising Network: A Light Solution for Real Noise Removal (CVPR2021).
Apache License 2.0
188 stars 35 forks source link

some error appeared when loading the pretrain model #29

Open LieKKKKK opened 1 year ago

LieKKKKK commented 1 year ago

23-08-24 11:20:35.478 - INFO: Loading model for G [/home/ubuntu01/codes/InvDN-main/pretrained/InvDN_ResUnit_x4.pth] ... Traceback (most recent call last): File "test_Real.py", line 206, in <module> main() File "test_Real.py", line 198, in main model = create_model(opt) File "/home/ubuntu01/codes/InvDN-main/codes/models/__init__.py", line 12, in create_model m = M(opt) File "/home/ubuntu01/codes/InvDN-main/codes/models/InvDN_model.py", line 34, in __init__ self.load() File "/home/ubuntu01/codes/InvDN-main/codes/models/InvDN_model.py", line 211, in load self.load_network(load_path_G, self.netG, self.opt['path']['strict_load']) File "/home/ubuntu01/codes/InvDN-main/codes/models/base_model.py", line 90, in load_network load_net = torch.load(load_path) File "/home/ubuntu01/anaconda3/envs/MWCNNv2/lib/python3.5/site-packages/torch/serialization.py", line 367, in load return _load(f, map_location, pickle_module) File "/home/ubuntu01/anaconda3/envs/MWCNNv2/lib/python3.5/site-packages/torch/serialization.py", line 528, in _load magic_number = pickle_module.load(f) _pickle.UnpicklingError: A load persistent id instruction was encountered, but no persistent_load function was specified.

LieKKKKK commented 1 year ago

its seems like my torch version does not equal to yours.Here is my env certifi 2020.6.20 cycler 0.10.0 decorator 5.1.1 h5py 2.10.0 imageio 2.9.0 importlib-resources 3.2.1 kiwisolver 1.1.0 lmdb 1.4.1 matplotlib 3.0.3 networkx 2.4 numpy 1.17.0 opencv-python 4.4.0.42 Pillow 7.2.0 pip 20.3.4 pyparsing 2.4.7 python-dateutil 2.8.2 PyWavelets 1.1.1 PyYAML 5.3.1 scikit-image 0.15.0 scipy 1.0.0 setuptools 40.2.0 six 1.16.0 torch 1.0.0 torchvision 0.2.1 tqdm 4.64.1 wheel 0.37.1 zipp 1.2.0