greydanus / baselines

Simple MNIST baselines for 1) numpy backprop 2) dense nns 3) cnns 3) seq2seq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Baselines

Sam Greydanus. 2018. MIT License.

Written in PyTorch

About

A set of self-contained Jupyter notebooks aimed at providing quick and easy-to-modify baselines. Specifically:

I only trained these models on 1-3 epochs of MNIST, so they could probably do a little better. I wanted these baselines to be:

  • something I could train in ~2 minutes on my laptop
  • something that captured the general idea (of backprop, of neural nets, of cnns, of seq2seq models respectively)
  • something very reproducible (I save training stats and models along the way, etc.)
  • something easy to visualize/understand
    • The code is minimal
    • I plot training stats and a few examples at the end
    • Each notebook is self-contained (minimal dependencies)

-> I don't include pretrained models for the MNIST baselines because each notebook runs in <5 minutes on a 2014 MacBook.

Dependencies

Pretty Plots

Pure numpy classifier

mnist-np-stats.png

Dense classifier (PyTorch)

mnist-fc-stats.png

Convolutional classifier (PyTorch)

mnist-cnn-stats.png

Sequential Model (PyTorch)

mnist-seq-stats.png

Visualizing sequential Model (PyTorch)

mnist-seq-example.png

About

Simple MNIST baselines for 1) numpy backprop 2) dense nns 3) cnns 3) seq2seq


Languages

Language:Jupyter Notebook 100.0%