Skip to main content

build_sigmoid_lut

Function build_sigmoid_lut 

Source
pub fn build_sigmoid_lut(
    input_scale: f32,
    input_zero_point: i32,
    output_scale: f32,
    output_zero_point: i32,
) -> [i8; 256]
Expand description

Sigmoid lookup table, 1 / (1 + exp(-x)) (C++ buildQSigmoidLUT). An output grid of scale 1/256 and zero point -128 uses the full int8 range.