tf.quantization.quantize_and_dequantize

Quantizes then dequantizes a tensor. (deprecated)

inputA Tensor to quantize and dequantize.
input_minIf range_given=True, the minimum input value, that needs to be represented in the quantized representation. If axis is specified, this should be a vector of minimum values for each slice along axis.
input_maxIf range_given=True, the maximum input value that needs to be represented in the quantized representation. If axis is specified, this should be a vector of maximum values for each slice along axis.
signed_inputTrue if the quantization is signed or unsigned.
num_bitsThe bitwidth of the quantization.
range_givenIf true use input_min and input_max for the range of the input, otherwise determine min and max from the input Tensor.
round_modeRounding mode when rounding from float values to quantized ones. one of ['HALF_TO_EVEN', 'HALF_UP']
nameOptional name for the operation.
narrow_rangeIf true, then the absolute value of the quantized minimum value is the same as the quantized maximum value, instead of 1 greater. i.e. for 8 bit quantization, the minimum value is -127 instead of -128.
axisInteger. If specified, refers to a dimension of the input tensor, such that quantization will be per slice along that dimension.

A Tensor. Each element is the result of quantizing and dequantizing the corresponding element of input.