Skip to main content

dequantize_gradient

Function dequantize_gradient 

Source
pub fn dequantize_gradient(
    quantized: &[i64],
    scale: f64,
    modulus: i64,
) -> Vec<f64>
Expand description

Inverse of quantize_gradient applied to a vector of canonical [0, modulus) representatives.

Values strictly greater than modulus / 2 are interpreted as negative fixed-point numbers (the standard two’s-complement style centring around zero), then scaled back to f64.