Table Of Contents
Table Of Contents


mxnet.ndarray.contrib.dequantize(data=None, min_range=None, max_range=None, out_type=_Null, out=None, name=None, **kwargs)

Dequantize the input tensor into a float tensor. min_range and max_range are scalar floats that specify the range for the output data.

When input data type is uint8, the output is calculated using the following equation:

out[i] = in[i] * (max_range - min_range) / 255.0,

When input data type is int8, the output is calculate using the following equation by keep zero centered for the quantized value:

out[i] = in[i] * MaxAbs(min_range, max_range) / 127.0,


This operator only supports forward propogation. DO NOT use it in training.

Defined in src/operator/quantization/

  • data (NDArray) – A ndarray/symbol of type uint8
  • min_range (NDArray) – The minimum scalar value possibly produced for the input in float32
  • max_range (NDArray) – The maximum scalar value possibly produced for the input in float32
  • out_type ({'float32'},optional, default='float32') – Output data type.
  • out (NDArray, optional) – The output NDArray to hold the result.

out – The output of this function.

Return type:

NDArray or list of NDArrays