MNIST
Description
The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. It is a subset of a larger set available from NIST. The digits have been size-normalized and centered in a fixed-size image.
Neural network
This is the test with the neural network architecture used to obtain up to 98.32% accuracy on this dataset. To reach this accuracy you may need more attempts and more learning time.
TEST_F(MnistTest, convolutionalNeuralNetwork)
{
StraightforwardNeuralNetwork neuralNetwork({
Input(28, 28, 1),
Convolution(1,5, activation::GELU, ErrorMultiplier(10.0f)),
FullyConnected(70),
FullyConnected(10)
});
neuralNetwork.train(*data, 1_ep || 15_s);
auto accuracy = neuralNetwork.getGlobalClusteringRate();
ASSERT_ACCURACY(accuracy, 0.93f);
}