Skip to main content

build_dequantize_linear_node

Function build_dequantize_linear_node 

Source
pub fn build_dequantize_linear_node(
    names: &DequantLinearNames,
    axis: Option<usize>,
) -> NodeProto
Expand description

Build a DequantizeLinear NodeProto.

ONNX spec (opset ≥ 10): inputs = [x (INT8), x_scale (FP32), x_zero_point (INT8)] outputs = [y (FP32)] y = (x - x_zero_point) × x_scale

When axis is Some(a), the axis attribute is set on the node, enabling per-channel dequantization (opset ≥ 13).