![]() |
Edge AI Add-on API 2.3.0
|
| nrf_axon_result_e nrf_axon_nn_model_infer_sync_multi_inputs | ( | const nrf_axon_nn_compiled_model_s * | compiled_model, |
| int8_t * | output_buffer ) |
Blocking inference function of a compiled model with multiple inputs.
The compiled_model->input_vector_list must be populated with the addresses of the various inputs. Use nrf_axon_nn_set_input_vector to populate input_vector_list.
If input_vector_list or any of its entries is NULL, the user has to copy the model input to the correct location in the interlayer buffer (specified by the compiled_model). In a dynamic system where there are other threads utilizing axon and/or asynchronous inference is occurring, the user must 1st call nrf_axon_platform_reserve_for_user() prior to accessing the interlayer_buffer, then invoke this function.
Similarly, output_buffer cannot be NULL in a dynamic system as there is no way to retain control of axon after inference completes.
Cannot be called from interrupt context.
| [in] | compiled_model | The compiled model to perform inference on that has been validated by calling nrf_axon_nn_model_validate(compiled_model). |
| [out] | output_buffer | buffer to hold the packed output results. Can be NULL (see above). Must be sized to hold all the output layers of the model. The offset into output_buffer for each output is returned by nrf_axon_nn_offset_to_output_ndx() |
| 0 | on success, are a negative error code. |