quantize_tensor

Function quantize_tensor 

Source
pub fn quantize_tensor<B: Backend>(
    tensor: &Tensor<B>,
    config: &QuantConfig,
) -> Result<QuantizedTensor>
Expand description

Quantize a float tensor to a QuantizedTensor.

ยงArguments

  • tensor: the FP32/FP64 tensor to quantize
  • config: quantization configuration