Using a convolutional neural network trained on the MNSIT dataset to predict handwritten digits in React. The PyTorch model is trained locally and then converted to an ONNX model, allowing usage in the browser. Since the input from the MNIST dataset are
After the second convolutional layer, max pooling is being performed. Max pooling extracts the highest value from the feature map.
This is followed by the first dropout layer, dropping $25%$ of the neurons. This is done to prevent overfitting and to speed up the learning process.
As a part of the classification the input is flattened before entering a fully connected layer, another relu activation, a $50%$ dropout layer and the last fully connected layer.
Finally the softmax activation function is applied, giving predictions for each label, i.e. digit.

