Skip to main content

quantize

Function quantize 

Source
pub fn quantize<T>(
    tensor: &Tensor<T>,
    params: &QuantizationParams,
) -> Result<Tensor<i8>>
where T: Float + Send + Sync + Clone + Default + 'static + Pod + Zeroable,
Expand description

Quantize a float32 tensor to INT8 or INT4