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 to run #1

Open
anonymous1computervision opened this issue Oct 3, 2019 · 0 comments
Open

Error to run #1

anonymous1computervision opened this issue Oct 3, 2019 · 0 comments

Comments

@anonymous1computervision
Copy link

anonymous1computervision commented Oct 3, 2019

Hi,

I run your code and get the following error.

Traceback (most recent call last):
  File "train_image.py", line 465, in <module>
    train(config)
  File "train_image.py", line 272, in train
    loss_G_s2t = criterion_GAN(pred_fake, labels_source.float())
  File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/modules/loss.py", line 421, in forward
    return F.mse_loss(input, target, reduction=self.reduction)
  File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/functional.py", line 1716, in mse_loss
    return _pointwise_loss(lambda a, b: (a - b) ** 2, torch._C._nn.mse_loss, input, target, reduction)
  File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/functional.py", line 1674, in _pointwise_loss
    return lambd_optimized(input, target, reduction)
RuntimeError: input and target shapes do not match: input [36 x 1], target [36] at /pytorch/aten/src/THCUNN/generic/MSECriterion.cu:12

Can you please help to sort out this problem?

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