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

Using BCELoss #30

Open
hrishi483 opened this issue Dec 17, 2023 · 1 comment
Open

Using BCELoss #30

hrishi483 opened this issue Dec 17, 2023 · 1 comment

Comments

@hrishi483
Copy link

No description provided.

@hrishi483 hrishi483 reopened this Dec 17, 2023
@hrishi483
Copy link
Author

I modified the given code to change the criterion = nn.CrossEntropyLoss() with criterion= BCELoss() but I get a ValueError here
as ValueError: Using a target size (torch.Size([4])) that is different to the input size (torch.Size([4, 2])) is deprecated. Please ensure they have the same size. Can someone tell the reason and also provide the solution Please ??

@hrishi483 hrishi483 reopened this Dec 17, 2023
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