Functions | |
int | mtb_ml_utils_find_max (const MTB_ML_DATA_T *in, int size) |
: This function finds the maximum value in an array and return its index. More... | |
int | mtb_ml_utils_find_max_int32 (const int32_t *in, int size) |
: This function finds the maximum value in an int32_t array and return its index. More... | |
cy_rslt_t | mtb_ml_utils_print_model_info (const mtb_ml_model_t *obj) |
: Print detailed model info More... | |
cy_rslt_t | mtb_ml_utils_model_quantize (const mtb_ml_model_t *obj, const float *input_data, MTB_ML_DATA_T *quantized_values) |
: Quantizes float data for model input. This function will always attempt to quantize the provided input data. In order to properly use this function the end user must give the mtb ml model object, pointer to the input data of floating point values and a pointer to a input buffer to contain all quantized values. More... | |
cy_rslt_t | mtb_ml_utils_model_dequantize (const mtb_ml_model_t *obj, float *dequantized_values) |
: Dequantize model's output if it is quantized More... | |
int mtb_ml_utils_find_max | ( | const MTB_ML_DATA_T * | in, |
int | size | ||
) |
: This function finds the maximum value in an array and return its index.
[in] | in | : Pointer of the array |
[in] | size | : size of the array |
int mtb_ml_utils_find_max_int32 | ( | const int32_t * | in, |
int | size | ||
) |
: This function finds the maximum value in an int32_t array and return its index.
[in] | in | : Pointer of the array |
[in] | size | : size of the array |
cy_rslt_t mtb_ml_utils_model_dequantize | ( | const mtb_ml_model_t * | obj, |
float * | dequantized_values | ||
) |
: Dequantize model's output if it is quantized
[in] | obj | : Pointer of model object. |
[out] | dequantized_values | : pointer of dequantized_values |
cy_rslt_t mtb_ml_utils_model_quantize | ( | const mtb_ml_model_t * | obj, |
const float * | input_data, | ||
MTB_ML_DATA_T * | quantized_values | ||
) |
: Quantizes float data for model input. This function will always attempt to quantize the provided input data. In order to properly use this function the end user must give the mtb ml model object, pointer to the input data of floating point values and a pointer to a input buffer to contain all quantized values.
[in] | obj | : Pointer of model object. |
[in] | input_data | : Pointer to input floating point data |
[out] | quantized_values | : Input buffer to contain all quantized values. Its size should be allocated to match the number of input nodes within the model. |
cy_rslt_t mtb_ml_utils_print_model_info | ( | const mtb_ml_model_t * | obj | ) |
: Print detailed model info
[in] | obj | : Pointer of model object. |