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

Refine tf mnist #47

Merged
merged 3 commits into from
Jan 14, 2018
Merged

Conversation

chengduoZH
Copy link
Collaborator

No description provided.

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]
Copy link
Collaborator

@pkuyym pkuyym Jan 11, 2018

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)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thx!

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,
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Donw

Copy link
Owner

@dzhwinter dzhwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good.

@dzhwinter dzhwinter merged commit 60b9f42 into dzhwinter:master Jan 14, 2018
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

Successfully merging this pull request may close these issues.

3 participants