Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in pred_fake shape #24

Open
nisargshah1999 opened this issue Apr 21, 2020 · 0 comments
Open

Error in pred_fake shape #24

nisargshah1999 opened this issue Apr 21, 2020 · 0 comments

Comments

@nisargshah1999
Copy link

/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant