Error in pred_fake shape
nisargshah1999 opened this issue · 0 comments
/home/shah2/.local/lib/python3.6/site-packages/torch/nn/modules/loss.py:431: UserWarning: Using a target size (torch.Size([1])) that is different to the input size (torch.Size([1, 1])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.mse_loss(input, target, reduction=self.reduction)
torch.Size([1, 1]) torch.Size([1])
Epoch 001/200 [0001/2088] -- Traceback (most recent call last):
File "PyTorch-CycleGAN/train", line 178, in
images={'real_A': real_A, 'real_B': real_B, 'fake_A': fake_A, 'fake_B': fake_B})
File "/workspace/data/uiou_dark_zurich/PyTorch-CycleGAN/utils.py", line 39, in log
self.losses[loss_name] = losses[loss_name].data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number