Loading [MathJax]/extensions/TeX/AMSsymbols.js
CMSIS NN Software Library
 
All Data Structures Files Functions Variables Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Structure Types

Enums and Data Structures used in public API. More...

Data Structures

struct  cmsis_nn_tile
 
struct  cmsis_nn_context
 
struct  cmsis_nn_bias_data
 
struct  cmsis_nn_dims
 
struct  cmsis_nn_lstm_dims
 
struct  cmsis_nn_per_channel_quant_params
 
struct  cmsis_nn_per_tensor_quant_params
 
struct  cmsis_nn_quant_params
 
struct  cmsis_nn_activation
 
struct  cmsis_nn_conv_params
 
struct  cmsis_nn_transpose_conv_params
 
struct  cmsis_nn_dw_conv_params
 
struct  cmsis_nn_pool_params
 
struct  cmsis_nn_fc_params
 
struct  cmsis_nn_bmm_params
 
struct  cmsis_nn_transpose_params
 
struct  cmsis_nn_svdf_params
 
struct  cmsis_nn_softmax_lut_s16
 
struct  cmsis_nn_scaling
 
struct  cmsis_nn_lstm_gate
 
struct  cmsis_nn_lstm_params
 
struct  cmsis_nn_lstm_context
 

Enumerations

enum  arm_nn_activation_type {
  ARM_SIGMOID = 0 ,
  ARM_TANH = 1
}
 
enum  arm_cmsis_nn_status {
  ARM_CMSIS_NN_SUCCESS = 0 ,
  ARM_CMSIS_NN_ARG_ERROR = -1 ,
  ARM_CMSIS_NN_NO_IMPL_ERROR = -2 ,
  ARM_CMSIS_NN_FAILURE = -3
}
 

Description

Enums and Data Structures used in public API.


Data Structure Documentation

◆ cmsis_nn_tile

struct cmsis_nn_tile

CMSIS-NN object to contain the width and height of a tile

Data Fields
int32_t h

Height

int32_t w

Width

◆ cmsis_nn_context

struct cmsis_nn_context

CMSIS-NN object used for the function context.

Data Fields
void * buf

Pointer to a buffer needed for the optimization

int32_t size

Buffer size

◆ cmsis_nn_bias_data

struct cmsis_nn_bias_data

CMSIS-NN object used to hold bias data for int16 variants.

Data Fields
const void * data

Pointer to bias data

const bool is_int32_bias

Indicate type of bias data. True means int32 else int64

◆ cmsis_nn_dims

struct cmsis_nn_dims

CMSIS-NN object to contain the dimensions of the tensors

Data Fields
int32_t c

Input channels

int32_t h

Height

int32_t n

Generic dimension to contain either the batch size or output channels. Please refer to the function documentation for more information

int32_t w

Width

◆ cmsis_nn_lstm_dims

struct cmsis_nn_lstm_dims

CMSIS-NN object to contain LSTM specific input parameters related to dimensions

Data Fields
int32_t max_time
int32_t num_batches
int32_t num_inputs
int32_t num_outputs

◆ cmsis_nn_per_channel_quant_params

struct cmsis_nn_per_channel_quant_params

CMSIS-NN object for the per-channel quantization parameters

Data Fields
int32_t * multiplier

Multiplier values

int32_t * shift

Shift values

◆ cmsis_nn_per_tensor_quant_params

struct cmsis_nn_per_tensor_quant_params

CMSIS-NN object for the per-tensor quantization parameters

Data Fields
int32_t multiplier

Multiplier value

int32_t shift

Shift value

◆ cmsis_nn_quant_params

struct cmsis_nn_quant_params

CMSIS-NN object for quantization parameters. This struct supports both per-tensor and per-channels requantization and is recommended for new operators.

Data Fields
int32_t is_per_channel
int32_t * multiplier

Multiplier values

int32_t * shift

Shift values

◆ cmsis_nn_activation

struct cmsis_nn_activation

CMSIS-NN object for the quantized Relu activation

Data Fields
int32_t max

Max value used to clamp the result

int32_t min

Min value used to clamp the result

◆ cmsis_nn_conv_params

struct cmsis_nn_conv_params

CMSIS-NN object for the convolution layer parameters

Data Fields
cmsis_nn_activation activation
cmsis_nn_tile dilation
int32_t input_offset

The negative of the zero value for the input tensor

int32_t output_offset

The negative of the zero value for the output tensor

cmsis_nn_tile padding
cmsis_nn_tile stride

◆ cmsis_nn_transpose_conv_params

struct cmsis_nn_transpose_conv_params

CMSIS-NN object for the transpose convolution layer parameters

Data Fields
cmsis_nn_activation activation
cmsis_nn_tile dilation
int32_t input_offset

The negative of the zero value for the input tensor

int32_t output_offset

The negative of the zero value for the output tensor

cmsis_nn_tile padding
cmsis_nn_tile padding_offsets
cmsis_nn_tile stride

◆ cmsis_nn_dw_conv_params

struct cmsis_nn_dw_conv_params

CMSIS-NN object for the depthwise convolution layer parameters

Data Fields
cmsis_nn_activation activation
int32_t ch_mult

Channel Multiplier. ch_mult * in_ch = out_ch

cmsis_nn_tile dilation
int32_t input_offset

The negative of the zero value for the input tensor

int32_t output_offset

The negative of the zero value for the output tensor

cmsis_nn_tile padding
cmsis_nn_tile stride

◆ cmsis_nn_pool_params

struct cmsis_nn_pool_params

CMSIS-NN object for pooling layer parameters

Data Fields
cmsis_nn_activation activation
cmsis_nn_tile padding
cmsis_nn_tile stride

◆ cmsis_nn_fc_params

struct cmsis_nn_fc_params

CMSIS-NN object for Fully Connected layer parameters

Data Fields
cmsis_nn_activation activation
int32_t filter_offset

The negative of the zero value for the filter tensor

int32_t input_offset

The negative of the zero value for the input tensor

int32_t output_offset

The negative of the zero value for the output tensor

◆ cmsis_nn_bmm_params

struct cmsis_nn_bmm_params

CMSIS-NN object for Batch Matmul layer parameters

Data Fields
const bool adj_x
const bool adj_y
cmsis_nn_fc_params fc_params

◆ cmsis_nn_transpose_params

struct cmsis_nn_transpose_params

CMSIS-NN object for Transpose layer parameters

Data Fields
const int32_t num_dims
const uint32_t * permutations

The dimensions applied to the input dimensions

◆ cmsis_nn_svdf_params

struct cmsis_nn_svdf_params

CMSIS-NN object for SVDF layer parameters

Data Fields
cmsis_nn_activation input_activation
int32_t input_offset

The negative of the zero value for the input tensor

cmsis_nn_activation output_activation
int32_t output_offset

The negative of the zero value for the output tensor

int32_t rank

◆ cmsis_nn_softmax_lut_s16

struct cmsis_nn_softmax_lut_s16

CMSIS-NN object for Softmax s16 layer parameters

Data Fields
const int16_t * exp_lut
const int16_t * one_by_one_lut

◆ cmsis_nn_scaling

struct cmsis_nn_scaling

CMSIS-NN object for quantization parameters

Data Fields
int32_t multiplier

Multiplier value

int32_t shift

Shift value

◆ cmsis_nn_lstm_gate

struct cmsis_nn_lstm_gate

CMSIS-NN object for LSTM gate parameters

Data Fields
arm_nn_activation_type activation_type
const void * bias
const void * hidden_effective_bias

Precomputed kernel_sum * lhs_offset

int32_t hidden_multiplier
int32_t hidden_shift
const void * hidden_weights
const void * input_effective_bias

Bias added with precomputed kernel_sum * lhs_offset

int32_t input_multiplier
int32_t input_shift
const void * input_weights

◆ cmsis_nn_lstm_params

struct cmsis_nn_lstm_params

CMSIS-NN object for LSTM parameters

Data Fields
int32_t batch_size
int32_t cell_clip

Min/max value of cell output

cmsis_nn_lstm_gate cell_gate
int32_t cell_scale_power
cmsis_nn_lstm_gate forget_gate
int32_t forget_to_cell_multiplier
int32_t forget_to_cell_shift
int32_t hidden_size

Size of output from the LSTM cell, used as output and recursively into the next time step

cmsis_nn_lstm_gate input_gate
int32_t input_offset
int32_t input_size

Size of new data input into the LSTM cell

int32_t input_to_cell_multiplier
int32_t input_to_cell_shift
cmsis_nn_lstm_gate output_gate
int32_t output_multiplier
int32_t output_offset
int32_t output_shift
int32_t time_major

0 if first dimension is batch, else first dimension is time

int32_t time_steps

◆ cmsis_nn_lstm_context

struct cmsis_nn_lstm_context

CMSIS-NN object for LSTM scratch buffers

Data Fields
void * cell_state
void * temp1
void * temp2

Enumeration Type Documentation

◆ arm_cmsis_nn_status

Function return codes

Enumerator
ARM_CMSIS_NN_SUCCESS 

No error

ARM_CMSIS_NN_ARG_ERROR 

One or more arguments are incorrect

ARM_CMSIS_NN_NO_IMPL_ERROR 

No implementation available

ARM_CMSIS_NN_FAILURE 

Logical error

◆ arm_nn_activation_type

Enum for specifying activation function types

Enumerator
ARM_SIGMOID 

Sigmoid activation function

ARM_TANH 

Tanh activation function