Skip to main content

fake_quant_int

Function fake_quant_int 

Source
pub fn fake_quant_int(
    x: &Array1<f64>,
    params: &QuantParams,
    mode: RoundingMode,
    rng: &mut impl Rng,
) -> Array1<f64>
Expand description

Fake-quantize a 1-D tensor through the integer grid (per-tensor).

Returns dequant(quant(x)) element-wise; the output stays in f64 but only takes values on the reconstructed grid.