The model has been trained on the popular MNIST dataset.
Source
The model is trained in CNTK following the tutorial CNTK 103D: Convolutional Neural Network with MNIST. Note that the specific architecture used is the model with alternating convolution and max pooling layers (found under the "Solution" section at the end of the tutorial).
We used CNTK as the framework to perform inference. A brief description of the inference process is provided below:
Input
Input tensor has shape (1x1x28x28), with type of float32.
One image at a time. This model doesn't support mini-batch.
Preprocessing
Images are resized into (28x28) in grayscale, with a black background and a white foreground (the number should be in white). Color value is scaled to [0.0, 1.0].
The likelihood of each number before softmax, with shape of (1x10).
Postprocessing
Route the model output through a softmax function to map the aggregated activations across the network to probabilities across the 10 classes.
Sample test data
Sets of sample input and output files are provided in
serialized protobuf TensorProtos (.pb), which are stored in the folders test_data_set_*/.
Quantization
MNIST-12-int8 is obtained by quantizing MNIST-12 model. We use Intel® Neural Compressor with onnxruntime backend to perform quantization. View the instructions to understand how to use Intel® Neural Compressor for quantization.