QuantizeAndDequantizeV4.Options

public static class QuantizeAndDequantizeV4.Options

Optional attributes for QuantizeAndDequantizeV4

Public Methods

QuantizeAndDequantizeV4.Options
axis (Long axis)
QuantizeAndDequantizeV4.Options
narrowRange (Boolean narrowRange)
QuantizeAndDequantizeV4.Options
numBits (Long numBits)
QuantizeAndDequantizeV4.Options
rangeGiven (Boolean rangeGiven)
QuantizeAndDequantizeV4.Options
roundMode (String roundMode)
QuantizeAndDequantizeV4.Options
signedInput (Boolean signedInput)

Inherited Methods

Public Methods

public QuantizeAndDequantizeV4.Options axis (Long axis)

Parameters
axis If specified, this axis is treated as a channel or slice axis, and a separate quantization range is used for each channel or slice along this axis.

public QuantizeAndDequantizeV4.Options narrowRange (Boolean narrowRange)

Parameters
narrowRange If 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.

public QuantizeAndDequantizeV4.Options numBits (Long numBits)

Parameters
numBits The bitwidth of the quantization.

public QuantizeAndDequantizeV4.Options rangeGiven (Boolean rangeGiven)

Parameters
rangeGiven Whether the range is given or should be determined from the `input` tensor.

public QuantizeAndDequantizeV4.Options roundMode (String roundMode)

Parameters
roundMode The 'round_mode' attribute controls which rounding tie-breaking algorithm is used when rounding float values to their quantized equivalents. The following rounding modes are currently supported:
  • HALF_TO_EVEN: this is the default round_mode.
  • HALF_UP: round towards positive. In this mode 7.5 rounds up to 8 and -7.5 rounds up to -7.

public QuantizeAndDequantizeV4.Options signedInput (Boolean signedInput)

Parameters
signedInput Whether the quantization is signed or unsigned. (actually this parameter should have been called `signed_output` )