dearleiii / PIRM-2018-SISR-Challenge

Super Resolution
https://www.pirm2018.org/PIRM-SR.html
2 stars 0 forks source link

Load model #13

Closed dearleiii closed 6 years ago

dearleiii commented 6 years ago

leichen@gpu-compute2$ python3 load_model_test.py Traceback (most recent call last): File "load_model_test.py", line 19, in model1.load_state_dict(torch.load('/home/home2/leichen/SuperResolutor/Approx_discrim/model3/n4conv3.pt')) File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 695, in load_state_dict state_dict = state_dict.copy() AttributeError: 'function' object has no attribute 'copy'

dearleiii commented 6 years ago

Change another way instead:

model1 = APXM_conv3()

model1.load_state_dict(torch.load('/home/home2/leichen/SuperResolutor/Approx_discrim/mode\

l3/n4conv3.pt'))
model1 = torch.load('n4conv3.pt') print(model1)