Function nn_tensor_set_zeros

Source
pub unsafe extern "C" fn nn_tensor_set_zeros(
    tensor: *mut NNTensor,
    n_zeros: usize,
    zeros: *const i32,
    own: c_int,
)
Expand description

Sets the quantization zero-points for the tensor. If n_zeros>1 it should match the channel dimension (axis) of the tensor.

If own=1 then the tensor will take ownership of the buffer and free it when the tensor is released. Otherwise the buffer must outlive the tensor.

@public @memberof NNTensor @since 2.4