Edge AI Add-on API 2.3.0
Loading...
Searching...
No Matches

◆ nrf_edgeai_run_inference()

nrf_edgeai_err_t nrf_edgeai_run_inference ( nrf_edgeai_t * p_edgeai)

#include <include/nrf_edgeai/rt/nrf_edgeai_runtime.h>

Running live input features into a machine learning algorithm (or “ML/NN model”) to inference an output.

If the operation is succeeded (NRF_EDGEAI_ERR_SUCCESS), the inference result you can get from p_edgeai->decoded_output.regression or p_edgeai->decoded_output.classif depending on your model task

Note
Backward compatibility: if input features have not been processed yet (i.e. nrf_edgeai_process_features() was not explicitly called beforehand and its state bit is not set), this function will invoke it internally before running inference. Any error returned by nrf_edgeai_process_features() (e.g. NRF_EDGEAI_ERR_WRONG_STATE if the input window has not been fully collected via nrf_edgeai_feed_inputs() yet) is propagated as-is. If features were already processed explicitly, that step is skipped and inference runs directly.
On success, the "inputs collected" and "features processed" state bits are cleared and the "inference completed" state bit is set.
Parameters
[in,out]p_edgeaiPointer to Edge AI Lab user context nrf_edgeai_t
Returns
Operation status code nrf_edgeai_err_t