Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

test accuracy truncated to integer #17

Open
gobbedy opened this issue Mar 30, 2019 · 0 comments
Open

test accuracy truncated to integer #17

gobbedy opened this issue Mar 30, 2019 · 0 comments

Comments

@gobbedy
Copy link

gobbedy commented Mar 30, 2019

The test accuracy is computed using acc = 100.*correct/total in train.py. Since both "correct" and "total" are integers, the expression returns an integer, so the test accuracy is rounded down to nearest integer.
This can be solved by using this instead:
acc = 100.*correct.float()/total

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant