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

Minor Bugs caused by old version #75

Open
planemanner opened this issue Oct 7, 2021 · 0 comments
Open

Minor Bugs caused by old version #75

planemanner opened this issue Oct 7, 2021 · 0 comments

Comments

@planemanner
Copy link

planemanner commented Oct 7, 2021

This issue is for pytorch 1.7+ version user

Line 148, 160 in main.py script

Line 148

100. * batch_idx / len(train_loader), loss.data[0]))

Line 160

test_loss += F.cross_entropy(output, target, size_average=False).data[0]

The end of those code lines should be revised as following
.data[0] -> .item()

I know most of guys using this repo can fix easily, but someone would be confused.
So I leave above minor tip in this issue.

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