tensor.dequantize_linear
Dequantizes a Tensor using linear dequantization.
The linear dequantization operator. It consumes a quantized tensor, a scale, and 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 must have same shape, and can be either a scalar for per-tensor / per layer quantization, or a 1-D tensor for per-axis quantization.
Args
self
(@Tensor<Q>
) - The input tensor.x_scale
(@Tensor<T>
) - Scale for inputx
.x_zero_point
(@Tensor<T>
) - Zero point for inputx
.
Returns
A new Tensor<T>
with the same shape as the input tensor, containing the dequantized values.
Type Constraints
u32 tensor, not supported. fp8x23wide tensor, not supported. fp16x16wide tensor, not supported.
Examples
Last updated