You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
19-12-10 08:40:22.144 - INFO: Model [SRGANModel] is created.
19-12-10 08:40:22.144 - INFO: Start training from epoch: 0, iter: 0
/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/modules/loss.py:91: UserWarning: Using a target size (torch.Size([16, 3, 129, 129])) that is different to the input size (torch.Size([16, 3, 172, 172])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.l1_loss(input, target, reduction=self.reduction)
Traceback (most recent call last):
File "train.py", line 310, in
main()
File "train.py", line 158, in main
model.optimize_parameters(current_step)
File "/home/thrc_pyj/mmsr-master/codes/models/SRGAN_model.py", line 145, in optimize_parameters
l_g_pix = self.l_pix_w * self.cri_pix(self.fake_H, self.var_H)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 91, in forward
return F.l1_loss(input, target, reduction=self.reduction)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/functional.py", line 2230, in l1_loss
expanded_input, expanded_target = torch.broadcast_tensors(input, target)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/functional.py", line 62, in broadcast_tensors
return torch._C._VariableFunctions.broadcast_tensors(tensors)
RuntimeError: The size of tensor a (172) must match the size of tensor b (129) at non-singleton dimension 3
I have no idea how the 172 come up. It should be 129(I set GT_size = 129).
Can anyone help me?
The text was updated successfully, but these errors were encountered:
My scale is 3, and I used the ESRGAN model , so I guess that maybe the pretrained model does not match my data? (the pretrained model's scale is 4, but mine is 3)
19-12-10 08:40:22.144 - INFO: Model [SRGANModel] is created.
19-12-10 08:40:22.144 - INFO: Start training from epoch: 0, iter: 0
/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/modules/loss.py:91: UserWarning: Using a target size (torch.Size([16, 3, 129, 129])) that is different to the input size (torch.Size([16, 3, 172, 172])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.l1_loss(input, target, reduction=self.reduction)
Traceback (most recent call last):
File "train.py", line 310, in
main()
File "train.py", line 158, in main
model.optimize_parameters(current_step)
File "/home/thrc_pyj/mmsr-master/codes/models/SRGAN_model.py", line 145, in optimize_parameters
l_g_pix = self.l_pix_w * self.cri_pix(self.fake_H, self.var_H)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 91, in forward
return F.l1_loss(input, target, reduction=self.reduction)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/nn/functional.py", line 2230, in l1_loss
expanded_input, expanded_target = torch.broadcast_tensors(input, target)
File "/home/thrc_pyj/anaconda3/envs/torch1/lib/python3.7/site-packages/torch/functional.py", line 62, in broadcast_tensors
return torch._C._VariableFunctions.broadcast_tensors(tensors)
RuntimeError: The size of tensor a (172) must match the size of tensor b (129) at non-singleton dimension 3
I have no idea how the 172 come up. It should be 129(I set GT_size = 129).
Can anyone help me?
The text was updated successfully, but these errors were encountered: