pub unsafe extern "C" fn nn_tensor_quantize(
dest: *mut NNTensor,
source: *mut NNTensor,
axis: c_int,
) -> NNErrorExpand description
Quantizes the source tensor into the destination tensor.
The source tensor should be float and the destination integer. If the destination tensor does not have quantization parameters they will be calculated from the source tensor and stored into the destination tensor.
When calculating the quantization parameters if axis is a valid axis* then per-channel quantization will be performed along the axis, otherwise per-tensor quantization will be performed. If the destination tensor has quantization parameters axis is ignored.
Valid Axis: (axis > 0 && axis < n_dims)
@public @memberof NNTensor @since 2.4