dearleiii / PIRM-2018-SISR-Challenge

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

Test feed into model :AttributeError: 'Tensor' object has no attribute '_metadata' #14

Open dearleiii opened 6 years ago

dearleiii commented 6 years ago

leichen@gpu-compute2$ python3 load_model_test.py <bound method Module.state_dict of DataParallel( (module): APXM_conv3( (main): Sequential( (0): Conv2d(3, 8, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1)) (1): LeakyReLU(negative_slope=0.2, inplace) (2): Conv2d(8, 16, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1)) (3): LeakyReLU(negative_slope=0.2, inplace) (4): Conv2d(16, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1), bias=False) (5): LeakyReLU(negative_slope=0.2, inplace) ) (regressor): Sequential( (0): Linear(in_features=1048576, out_features=256, bias=True) (1): LeakyReLU(negative_slope=0.01) (2): Linear(in_features=256, out_features=1, bias=True) ) ) )> intpus: torch.Size([300, 3, 1020, 2040]) scores: torch.Size([300, 1]) Traceback (most recent call last): File "load_model_test.py", line 61, in outputs = model1(inputs) File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 607, in state_dict destination._metadata[prefix[:-1]] = dict(version=self._version) AttributeError: 'Tensor' object has no attribute '_metadata'

dearleiii commented 6 years ago

leichen@gpu-compute3$ python3 load_model_test.py DataParallel( (module): APXM_conv3( (main): Sequential( (0): Conv2d(3, 8, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1)) (1): LeakyReLU(negative_slope=0.2, inplace) (2): Conv2d(8, 16, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1)) (3): LeakyReLU(negative_slope=0.2, inplace) (4): Conv2d(16, 32, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1), bias=False) (5): LeakyReLU(negative_slope=0.2, inplace) ) (regressor): Sequential( (0): Linear(in_features=1048576, out_features=256, bias=True) (1): LeakyReLU(negative_slope=0.01) (2): Linear(in_features=256, out_features=1, bias=True) ) ) )