DequantizeLinear - version 10#

This page documents version 10 of operator DequantizeLinear. See DequantizeLinear for the latest version (since version 25).

  • Domain: ai.onnx

  • Since version: 10

The linear dequantization operator. It consumes a quantized tensor, a scale, a zero point to compute the full precision tensor. The dequantization formula is y = (x - x_zero_point) * x_scale. ‘x_scale’ and ‘x_zero_point’ are both scalars. ‘x_zero_point’ and ‘x’ must have same type. ‘x’ and ‘y’ must have same shape. In the case of dequantizing int32, there’s no zero point (zero point is supposed to be 0).

Inputs

  • x (T): N-D quantized input tensor to be de-quantized.

  • x_scale (tensor(float)): Scale for input ‘x’. It’s a scalar, which means a per-tensor/layer quantization.

  • x_zero_point (T): Zero point for input ‘x’. It’s a scalar, which means a per-tensor/layer quantization. It’s optional. 0 is the default value when it’s not specified.

Outputs

  • y (tensor(float)): N-D full precision output tensor. It has same shape as input ‘x’.

Type Constraints

  • T: Constrain ‘x_zero_point’ and ‘x’ to 8-bit/32-bit integer tensor. Allowed types: tensor(int32), tensor(int8), tensor(uint8).