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 when Running train.py #2

Open
strmojo opened this issue Jun 19, 2023 · 0 comments
Open

Error when Running train.py #2

strmojo opened this issue Jun 19, 2023 · 0 comments

Comments

@strmojo
Copy link

strmojo commented Jun 19, 2023

@iamyufan
I am encountering an error while attempting to run train.py with a reduced batch size. The original batch size was set to 100, but I have now reduced it to either 64 or 32. Unfortunately, I am receiving the following error message:

UserWarning: Using a target size (torch.Size([64, 1, 64, 64])) that is different from the input size (torch.Size([384, 1, 64, 64])). 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)

RuntimeError: The size of tensor a (384) must match the size of tensor b (64) at non-singleton dimension 0.

The confusing part is that sometimes the input size is shown as 384, while other times it is displayed as 192. I am unsure why it is happening.

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