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

Rewriting mnist.py for easier understanding #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Datadote
Copy link

  • Flattened train+eval loop and cleaned code
  • Kept fetch_mnist and TinyConvNet
  • 91 -> 69 lines
  • Similar performance(same settings as original mnist.py 100 steps, bs=64, lr=0.001)
    ---- (original) mnist.py ----
    Train Loss 0.10 | Train Acc. 0.97
    Test Acc: 0.955800
    real 0m46.187s
    user 0m40.215s
    sys 0m6.840s
    ---- mnist_new.py ----
    Train Loss: 0.1529 | Train Acc: 0.945
    Test Acc: 0.963
    real 0m46.551s
    user 0m40.530s
    sys 0m6.819s

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.

1 participant