Functions | |
cy_rslt_t | mtb_ml_model_init (const mtb_ml_model_bin_t *bin, const mtb_ml_model_buffer_t *buffer, mtb_ml_model_t **object) |
: Allocate and initialize NN model runtime object based on model data. Only intended to be called once. More... | |
cy_rslt_t | mtb_ml_model_deinit (mtb_ml_model_t *object) |
: Delete NN model runtime object and free all dynamically allocated memory. Only intended to be called once. More... | |
cy_rslt_t | mtb_ml_model_run (mtb_ml_model_t *object, MTB_ML_DATA_T *input) |
: Perform NN model inference More... | |
int | mtb_ml_model_get_input_size (const mtb_ml_model_t *object) |
: Get NN model input data size More... | |
cy_rslt_t | mtb_ml_model_get_output (const mtb_ml_model_t *object, MTB_ML_DATA_T **out_pptr, int *size_ptr) |
: Get NN model output buffer and size More... | |
cy_rslt_t | mtb_ml_model_rnn_reset_all_parameters (mtb_ml_model_t *object) |
: Reset model parameters More... | |
void * | mtb_ml_model_get_inference_object (const mtb_ml_model_t *object) |
: Get MTB ML inference runtime object More... | |
int | mtb_ml_model_profile_get_tsc (uint64_t *val) |
: Read time stamp counter (TSC) . More... | |
cy_rslt_t | mtb_ml_model_profile_config (mtb_ml_model_t *object, mtb_ml_profile_config_t config) |
: Update MTB ML inference profiling setting More... | |
cy_rslt_t | mtb_ml_model_profile_log (mtb_ml_model_t *object) |
: Generate MTB ML profiling log More... | |
cy_rslt_t mtb_ml_model_deinit | ( | mtb_ml_model_t * | object | ) |
: Delete NN model runtime object and free all dynamically allocated memory. Only intended to be called once.
[in] | object | : Pointer of model object. |
void* mtb_ml_model_get_inference_object | ( | const mtb_ml_model_t * | object | ) |
: Get MTB ML inference runtime object
[in] | object | : Pointer of model object. |
int mtb_ml_model_get_input_size | ( | const mtb_ml_model_t * | object | ) |
: Get NN model input data size
[in] | object | : Pointer of model object. |
cy_rslt_t mtb_ml_model_get_output | ( | const mtb_ml_model_t * | object, |
MTB_ML_DATA_T ** | out_pptr, | ||
int * | size_ptr | ||
) |
: Get NN model output buffer and size
[in] | object | : Pointer of model object. |
[out] | out_pptr | : Pointer of output buffer pointer |
[out] | size_ptr | : Pointer of output size |
cy_rslt_t mtb_ml_model_init | ( | const mtb_ml_model_bin_t * | bin, |
const mtb_ml_model_buffer_t * | buffer, | ||
mtb_ml_model_t ** | object | ||
) |
: Allocate and initialize NN model runtime object based on model data. Only intended to be called once.
[in] | bin | : Pointer of model binary data. |
[in] | buffer | : Pointer of buffer data structure for statically allocated persistent and scratch buffer. This is optional, if no passed-in buffer, the API will allocate memory as persistent and scratch buffer. |
[out] | object | : Pointer of model object. |
cy_rslt_t mtb_ml_model_profile_config | ( | mtb_ml_model_t * | object, |
mtb_ml_profile_config_t | config | ||
) |
: Update MTB ML inference profiling setting
[in] | object | : Pointer of model object's pointer. |
[in] | config | : Profiling setting |
int mtb_ml_model_profile_get_tsc | ( | uint64_t * | val | ) |
: Read time stamp counter (TSC) .
Platform specific function to read HW time stamp counter or OS tick timer counter for profiling. The application program developer should provide this function if profiling is enabled.
[out] | val | : Pointer to time stamp counter return value |
cy_rslt_t mtb_ml_model_profile_log | ( | mtb_ml_model_t * | object | ) |
: Generate MTB ML profiling log
[in] | object | : Pointer of model object. |
cy_rslt_t mtb_ml_model_rnn_reset_all_parameters | ( | mtb_ml_model_t * | object | ) |
: Reset model parameters
[in] | object | : Pointer of model object. |
cy_rslt_t mtb_ml_model_run | ( | mtb_ml_model_t * | object, |
MTB_ML_DATA_T * | input | ||
) |
: Perform NN model inference
[in] | object | : Pointer of model object. |
[in] | input | : Pointer of input data buffer |