Skip to content

Rewriting mnist.py for easier understanding#6

Open
Datadote wants to merge 1 commit into
tinygrad:mainfrom
Datadote:main
Open

Rewriting mnist.py for easier understanding#6
Datadote wants to merge 1 commit into
tinygrad:mainfrom
Datadote:main

Conversation

@Datadote

Copy link
Copy Markdown
  • 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