Functions | |
int | dnn_initialize (dnn_config_t *config) |
int | dnn_finalize (void) |
int | dnn_runtime_initialize (dnn_runtime_t *rt, const nn_network_t *network) |
int | dnn_runtime_finalize (dnn_runtime_t *rt) |
int | dnn_runtime_forward (dnn_runtime_t *rt, const void *inputs[], unsigned char input_num) |
int | dnn_runtime_input_num (dnn_runtime_t *rt) |
int | dnn_runtime_input_size (dnn_runtime_t *rt, unsigned char input_index) |
int | dnn_runtime_input_ndim (dnn_runtime_t *rt, unsigned char input_index) |
int | dnn_runtime_input_shape (dnn_runtime_t *rt, unsigned char input_index, unsigned char dim_index) |
nn_variable_t * | dnn_runtime_input_variable (dnn_runtime_t *rt, unsigned char input_index) |
int | dnn_runtime_output_num (dnn_runtime_t *rt) |
int | dnn_runtime_output_size (dnn_runtime_t *rt, unsigned char output_index) |
int | dnn_runtime_output_ndim (dnn_runtime_t *rt, unsigned char output_index) |
int | dnn_runtime_output_shape (dnn_runtime_t *rt, unsigned char output_index, unsigned char dim_index) |
nn_variable_t * | dnn_runtime_output_variable (dnn_runtime_t *rt, unsigned char output_index) |
void * | dnn_runtime_output_buffer (dnn_runtime_t *rt, unsigned char output_index) |
int | dnn_nuttx_mallinfo (dnn_mallinfo_t *info) |
int | dnn_asmp_mallinfo (unsigned char array_length, dnn_mallinfo_t *info_array) |
int dnn_initialize | ( | dnn_config_t * | config | ) |
Initialize the whole dnnrt subsystem
[in] | config | configuration of multicore processing. If CONFIG_DNN_RT_MP=y, dnn_config_t::cpu_num must be 1 or more, otherwise dnn_config_t::cpu_num must be 1. |
int dnn_finalize | ( | void | ) |
Finalize the whole dnnrt subsystem. This function frees all the resources allocated through dnn_initialize().
int dnn_runtime_initialize | ( | dnn_runtime_t * | rt, |
const nn_network_t * | network | ||
) |
Instantiate a neural network defined by nn_network_t as a dnn_runtime_t object.
[in,out] | rt | dnnrt_runtime_t object |
[in] | network | pointer to a memory into which .nnb file is loaded |
int dnn_runtime_finalize | ( | dnn_runtime_t * | rt | ) |
Free all the memory allocated to a dnn_runtime_t object
[in,out] | rt | dnnrt_runtime_t object |
int dnn_runtime_forward | ( | dnn_runtime_t * | rt, |
const void * | inputs[], | ||
unsigned char | input_num | ||
) |
Execute forward propagation after feeding input data.
[in,out] | rt | dnnrt_runtime_t object |
[in] | inputs | an array of pointers to input buffers |
[in] | input_num | length of inputs |
int dnn_runtime_input_num | ( | dnn_runtime_t * | rt | ) |
Return the number of inputs which this network needs.
[in,out] | rt | dnnrt_runtime_t object |
int dnn_runtime_input_size | ( | dnn_runtime_t * | rt, |
unsigned char | input_index | ||
) |
Return the number of elements in a specified input.
[in,out] | rt | dnnrt_runtime_t object |
[in] | input_index | index to specify an input |
int dnn_runtime_input_ndim | ( | dnn_runtime_t * | rt, |
unsigned char | input_index | ||
) |
Return the number of a specified input's dimensions.
[in,out] | rt | dnnrt_runtime_t object |
[in] | input_index | index to specify an input |
int dnn_runtime_input_shape | ( | dnn_runtime_t * | rt, |
unsigned char | input_index, | ||
unsigned char | dim_index | ||
) |
Return the number of elements in a specified dimension of an input.
[in,out] | rt | dnnrt_runtime_t object |
[in] | input_index | index to specify an input |
[in] | dim_index | index to specify a dimension |
nn_variable_t * dnn_runtime_input_variable | ( | dnn_runtime_t * | rt, |
unsigned char | input_index | ||
) |
Get nn_variable_t* corresponding to a specified input
[in,out] | rt | dnnrt_runtime_t object |
[in] | input_index | index to specify an input |
int dnn_runtime_output_num | ( | dnn_runtime_t * | rt | ) |
Return the number of outputs which this network emits.
[in,out] | rt | dnnrt_runtime_t object |
int dnn_runtime_output_size | ( | dnn_runtime_t * | rt, |
unsigned char | output_index | ||
) |
Return the number of elements in a specified output.
[in,out] | rt | dnnrt_runtime_t object |
[in] | output_index | index to specify an output |
int dnn_runtime_output_ndim | ( | dnn_runtime_t * | rt, |
unsigned char | output_index | ||
) |
Return the number of a specified output's dimensions.
[in,out] | rt | dnnrt_runtime_t object |
[in] | output_index | index to specify an input |
int dnn_runtime_output_shape | ( | dnn_runtime_t * | rt, |
unsigned char | output_index, | ||
unsigned char | dim_index | ||
) |
Return the number of elements in a specified dimension of an output.
[in,out] | rt | dnnrt_runtime_t object |
[in] | output_index | index to specify an output |
[in] | dim_index | index to specify a dimension |
nn_variable_t * dnn_runtime_output_variable | ( | dnn_runtime_t * | rt, |
unsigned char | output_index | ||
) |
Get nn_variable_t* corresponding to a specified output
[in,out] | rt | dnnrt_runtime_t object |
[in] | output_index | index to specify an output |
void * dnn_runtime_output_buffer | ( | dnn_runtime_t * | rt, |
unsigned char | output_index | ||
) |
Return a pointer to a specified output
[in,out] | rt | dnnrt_runtime_t object |
[in] | output_index | index to specify an output |
int dnn_nuttx_mallinfo | ( | dnn_mallinfo_t * | info | ) |
Obtain information about memory allocation in the Nuttx-side heap
[out] | info | pointer to store memory allocation stats |
int dnn_asmp_mallinfo | ( | unsigned char | array_length, |
dnn_mallinfo_t * | info_array | ||
) |
Obtain information about memory allocation in the ASMP-side heap
[in] | array_length | Number of elements in info_array. This value must be dnn_config_t::cpu_num |
[out] | info_array | Array to store memory allocation stats |