-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refine tf mnist #47
Refine tf mnist #47
Conversation
47a1a0b
to
655f769
Compare
test_avg_acc = eval_test() | ||
print("pass=%d, training_avg_accuracy=%f, test_avg_acc=%f, elapse=%f" % | ||
(pass_id, g_acc[1], test_avg_acc, (pass_end - pass_start) / 1000)) | ||
return g_acc[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful here, tf.metrics.accuracy will accumulate the acc. Please make sure to reset the accumulating variables each time doing validation. You can refer tensorflow/tensorflow#4814 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thx!
tensorflow/mnist.py
Outdated
test_avg_acc = eval_test() | ||
print( | ||
"pass=%d, training_avg_accuracy=%f, test_avg_acc=%f, elapse=%f" | ||
% (pass_id, g_acc[1], test_avg_acc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, I think better to reset the accumulating state in the begin of each epoch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Donw
8644211
to
2d35e14
Compare
2d35e14
to
b796d23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good.
No description provided.