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

Little bug in main.py #12

Open
ymcasky opened this issue May 30, 2018 · 2 comments
Open

Little bug in main.py #12

ymcasky opened this issue May 30, 2018 · 2 comments

Comments

@ymcasky
Copy link

ymcasky commented May 30, 2018

Hi, ZhouYanzhao

Thanks for your sharing code!

line 163 should change to :
if test_acc > best_test_acc[0]: => if test_acc.float() > best_test_acc[0]:

@ZhouYanzhao
Copy link
Owner

Hi, @ymcasky
Thanks! The code does look a bit dated. I'm going to give it an upgrade next month to support the latest version of pytorch.

@ymcasky
Copy link
Author

ymcasky commented May 31, 2018

Thank you !!
Looking for your update with full function XD !
I think change from
test_acc = 100. * correct / len(test_loader.dataset) to
test_acc = 100. * correct.float() / len(test_loader.dataset) is better : )

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

2 participants