Open grace-create opened 2 years ago
We have updated our code, please download our code again. Then use (python tcw_sample_b.py --model esrgcnn --test_data_dir dataset/Set5 --scale 2 --ckpt_path checkpoint/esrgcnn.pth --sampledir samples singlemodel_urban100_x2) for testing.
Thank you!
Traceback (most recent call last):
File "tcw_sample_b.py", line 285, in
还是这个错误,求赐教!
请检查一下你的环境是否和我们的环境相同。此外,建议使用Ubuntu系统。
田春伟
西北工业大学
Traceback (most recent call last): File "tcw_sample_b.py", line 287, in
main(cfg)
File "tcw_sample_b.py", line 282, in main
sample(net, device, dataset, cfg)
File "tcw_sample_b.py", line 159, in sample
sr = net(lr, cfg.scale).detach().squeeze(0) #detach() break the reversed transformation.
File "/home/xinhui/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, kwargs)
File "/home/xinhui/Desktop/esrgcnn/esrgcnn/model/esrgcnn.py", line 113, in forward
b1 = self.b1(x1)
File "/home/xinhui/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, *kwargs)
File "/home/xinhui/Desktop/esrgcnn/esrgcnn/model/esrgcnn.py", line 53, in forward
out1_r = self.ReLU(remain1)
File "/home/xinhui/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(input, kwargs)
File "/home/xinhui/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/activation.py", line 98, in forward
return F.relu(input, inplace=self.inplace)
File "/home/xinhui/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/functional.py", line 1440, in relu
result = torch.relu_(input)
RuntimeError: Output 1 of SplitWithSizesBackward0 is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.