HTML generated from Jupyter notebook: mnist-classification-exercise-1.ipynb

Create a classifier for mnist dataset

In [ ]:
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
In [ ]:
from torchvision import datasets, transforms
mnist = datasets.MNIST(root='.', train=True, download=True)
In [ ]:
print("Number of training examples", mnist.train_data.shape)
print("Image information", mnist[0])
In [ ]:
import matplotlib.pyplot as plt
%matplotlib inline

To Do: model

To Do: data loader

To Do: training setup

To Do: evaluate the performance of the classifier