Open lrn1314 opened 1 year ago
Please first make sure the 'cuda:0' is available. If still not work, try replace '.cuda(self.opt.device)' by '.cuda()'.
After modification, it can run to Epoch2, but there are still new errors.
Epoch: 2 Traceback (most recent call last): File "main.py", line 221, in
train() File "main.py", line 160, in train I_g, I_o, loss_G = model.optimize_parameters() File "/LBP/model.py", line 274, in optimize_parameters self.forward() File "/LBP/model.py", line 187, in forward self.L_o = self.netLBP(self.L_i, self.mask) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, kwargs) File "/LBP/networks.py", line 119, in forward out = self.trans(input) + lbp File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, *kwargs) File "/LBP/trans.py", line 310, in forward x = self.conv1(x) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(input, kwargs) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 419, in forward return self._conv_forward(input, self.weight) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 416, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same
Hello, I encountered this error while running the code. I downloaded the code and ran it directly. I have installed python 1.6.0, cuda 10.2, cuDNN7.6 and python 3.7. What is the situation, please?