Overview

Introduction

This user manual describes the NMSIS NN software library, a collection of efficient neural network kernels developed to maximize the performance and minimize the memory footprint of neural networks on Nuclei N/NX Class Processors cores.

The library is divided into a number of functions each covering a specific category:

  • Neural Network Convolution Functions

  • Neural Network Activation Functions

  • Fully-connected Layer Functions

  • Neural Network Pooling Functions

  • Softmax Functions

  • Neural Network Support Functions

The library has separate functions for operating on different weight and activation data types including 8-bit integers (q7_t) and 16-bit integers (q15_t). The descrition of the kernels are included in the function description.

The implementation details are also described in this paper CMSIS-NN: Efficient Neural Network Kernels for Arm Cortex-M CPUs .

Block Diagram

NMSIS NN Block Diagram

NMSIS NN Block Diagram

Examples

The library ships with a number of examples which demonstrate how to use the library functions.

Pre-processor Macros

Each library project have differant pre-processor macros.

This library is only built for little endian targets.

RISCV_MATH_DSP:

Define macro RISCV_MATH_DSP, If the silicon supports DSP instructions.

RISCV_NN_TRUNCATE:

Define macro RISCV_NN_TRUNCATE to use floor instead of round-to-the-nearest-int for the computation.