This article describes the complete process from defining the network parameters to data preparation MNIST
to training and inferencing.
The trained network is used to inference the test dataset of MNIST on the Raspberry Pi.
The python code is generated and executed. During training process loss values and accuracy for training and test data are transferred to LabVIEW. When training is done the network weights and biases are used to doublechecked. TensorFlow inferencing is executed to get accuracy values. LabVIEW inferencing on x86 is done to validate accuracy. Transferring network parameters to Raspberry Pi (ARM) and inferencing for test data is executed to validate accuracy.
The MNIST database is a large database of handwritten digits and is widely used for training and testing in the field of machine learning. The database contains 60,000 training images and 10,000 testing images. The images are grayscale images with a resolution of 28x28 pixels. The first 9x9 images are shown to the left.
A fully connected feed forward network with an input, 3-hidden and one output layer (see image) is used for this demonstration.
The MNIST test set and the trained network is transferred to the Raspberry Pi.
During inferencing the network is executed in forward direction.
Testing on Raspberry Pi is done to validate the correct execution. One way to show that is the accuracy of the test set. It reaches the same value of 97.5%.