Check the supported layers

CMSIS-NN only supports a small number of layers. The network that you want to convert should contain only layers that are supported by CMSIS-NN. If a layer is not directly supported by CMSIS-NN, that layer should be translatable into an equivalent combination of CMSIS-NN layers and CMSIS-DSP functions. Otherwise, it will not be possible to convert the network into a CMSIS-NN implementation.

For instance, there is no LSTM layer implementation in CMSIS-NN. But a LSTM layer can be expressed with CMSIS-NN and CMSIS-DSP using:

  • Fully connected layers (CMSIS-NN)
  • Sigmoid and hyperbolic tangent activations (CMSIS-NN)
  • Elementwise vector product (CMSIS-DSP)

The CMSIS-NN library contains an example of implementation of a GRU layer with CMSIS-NN and CMSIS-DSP functions. You can look at this example to see how other layers could be expressed. The GRU example is in CMSIS/NN/arm_nn_examples/gru.

Previous Next