Train a Convolutional Neural Network online!

Train a CNN to recognize handwritten digits from the MNIST database using the tf.layers api.

Description

This examples lets you train a handwritten digit recognizer using either a Convolutional Neural Network (also known as a ConvNet or CNN) The CNN contains 8 layers in total. We use the softmax function as the activation for the output layer as it creates a probability distribution over our 10 classes so their output values sum to 1. Go train that model!

The MNIST dataset is used as training data.

Training Parameters

Training Progress

Test Your Model

Feel free to draw digits on the small blackboard there and get your model to predict the numbers!

Note: Press ` to toggle the bar chart window.

Visualise Layers

Now, you can visualise the layers by seeing the transformation done on image by each layer.

Layer-1 is a conv2D layer with 8 filters.

Layer-2 is a downsampling layer that downsamples the input by a factor of 2 in both dimensions.

Layer-3 is a conv2D layer with 16 filters.

Layer-4 is a downsampling layer that downsamples the input by a factor of 2 in both dimensions.

Layer-5 is a conv2D layer with 32 filters.

Layer-6 is a flattening layer

Layer-7 is a dense layer with 10 units.

Layer-8 is also a dense layer, but it has 10 units. One for each type of output.

You can also check out a 3D model of this CNN, and play with it.