This test is identical to the MNIST test, but runs using the RISC-V core instead of the ARM core.
This is the "Hello World" of machine learning. It uses the MNIST dataset of handwritten digits. See http://yann.lecun.com/exdb/mnist/. The input size is 28x28 pixels monochrome (i.e., 1x28x28 in CHW notation).
The code is auto-generated by the ai8x-synthesis tool and runs a known-answer test with a pre-defined input sample. This example will be enhanced with live capture and TFT output in the near future.
Universal instructions on building, flashing, and debugging this project can be found in the MSDK User Guide.
- This project comes pre-configured for the MAX78000EVKIT. See Board Support Packages in the UG for instructions on changing the target board.
If using the MAX78000EVKIT (EvKit_V1):
- Connect a USB cable between the PC and the CN1 (USB/PWR) connector.
- Connect pins 1 and 2 (P0_1) of the JH1 (UART 0 EN) header.
- Open a terminal application on the PC and connect to the EV kit's console UART at 115200, 8-N-1.
If using the MAX78000FTHR (FTHR_RevA)
- Connect a USB cable between the PC and the CN1 (USB/PWR) connector.
- Open a terminal application on the PC and connect to the EV kit's console UART at 115200, 8-N-1.
The Console UART of the device will output these messages:
Waiting...
*** RISC-V CNN Inference Test ***
*** PASS ***
Approximate inference time: 1423 us
Classification results:
[ -77992] -> Class 0: 0.0%
[ 93377] -> Class 1: 0.0%
[ 45484] -> Class 2: 0.0%
[ 29850] -> Class 3: 0.0%
[ -36248] -> Class 4: 0.0%
[-130974] -> Class 5: 0.0%
[-272399] -> Class 6: 0.0%
[ 416616] -> Class 7: 100.0%
[-148783] -> Class 8: 0.0%
[ 25073] -> Class 9: 0.0%