facebookresearch / mixup-cifar10

mixup: Beyond Empirical Risk Minimization
Other
1.17k stars 227 forks source link

test accuracy truncated to integer #17

Open gobbedy opened 5 years ago

gobbedy commented 5 years ago

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