A digit reader, built from blocks

A small model from Speliora's gallery looks at a handwritten digit and says which it is, 0 to 9.

How well it reads

of 10,000 test digits right
98.6%
weights
105,866
to train 2 epochs on a CPU
12 s

How it's built

Two rounds of Conv2d, ReLU and MaxPool2d find the strokes. Two Linear layers pick one of ten digits. Each block is a line of model.py.

The gallery's small CNN for digits in the model editor: Input, Conv2d, ReLU and MaxPool2d on the canvas, with the Conv2d selected; below, model.py highlights its line, self.conv2d_1 = nn.Conv2d(1, 16, kernel_size=3, padding=1), above the model's other layers.The gallery's small CNN for digits in the model editor: Input, Conv2d, ReLU and MaxPool2d on the canvas, with the Conv2d selected; below, model.py highlights its line, self.conv2d_1 = nn.Conv2d(1, 16, kernel_size=3, padding=1), above the model's other layers.The gallery's small CNN for digits in the model editor: Input, Conv2d, ReLU and MaxPool2d on the canvas, with the Conv2d selected; below, model.py highlights its line, self.conv2d_1 = nn.Conv2d(1, 16, kernel_size=3, padding=1), above the model's other layers.

Try it

Open it with File › Open in Speliora. It holds the model, not the data: the app downloads MNIST.

Download the project .speliora, 73 kB