Skip to main content

tract_state_run

Function tract_state_run 

Source
pub unsafe extern "C" fn tract_state_run(
    state: *mut TractState,
    inputs: *mut *mut TractTensor,
    outputs: *mut *mut TractTensor,
) -> TRACT_RESULT
Expand description

Run a turn on a model state

inputs is a pointer to an pre-existing array of input TractTensor. Its length must be equal to the number of inputs of the models. The function does not take ownership of the input tensors. outputs is a pointer to a pre-existing array of TractTensor pointers that will be overwritten with pointers to output tensors. These tensors are under the responsiblity of the caller, it will have to release them with tract_tensor_destroy.