Class QuantizeAndDequantize<T extends TNumber>

java.lang.Object
org.tensorflow.op.RawOp
org.tensorflow.op.quantization.QuantizeAndDequantize<T>
All Implemented Interfaces:
Shaped, Op, Operand<T>

@Operator(group="quantization") public final class QuantizeAndDequantize<T extends TNumber> extends RawOp implements Operand<T>
Quantizes then dequantizes a tensor. This is almost identical to QuantizeAndDequantizeV2, except that num_bits is a tensor, so its value can change during training.
  • Field Details

  • Constructor Details

    • QuantizeAndDequantize

      public QuantizeAndDequantize(Operation operation)
  • Method Details

    • create

      @Endpoint(describeByClass=true) public static <T extends TNumber> QuantizeAndDequantize<T> create(Scope scope, Operand<T> input, Operand<T> inputMin, Operand<T> inputMax, Operand<TInt32> numBits, QuantizeAndDequantize.Options... options)
      Factory method to create a class wrapping a new QuantizeAndDequantizeV3 operation.
      Type Parameters:
      T - data type for QuantizeAndDequantizeV3 output and operands
      Parameters:
      scope - current scope
      input - The input value
      inputMin - The inputMin value
      inputMax - The inputMax value
      numBits - The numBits value
      options - carries optional attribute values
      Returns:
      a new instance of QuantizeAndDequantize
    • signedInput

      public static QuantizeAndDequantize.Options signedInput(Boolean signedInput)
      Sets the signedInput option.
      Parameters:
      signedInput - the signedInput option
      Returns:
      this Options instance.
    • rangeGiven

      public static QuantizeAndDequantize.Options rangeGiven(Boolean rangeGiven)
      Sets the rangeGiven option.
      Parameters:
      rangeGiven - the rangeGiven option
      Returns:
      this Options instance.
    • narrowRange

      public static QuantizeAndDequantize.Options narrowRange(Boolean narrowRange)
      Sets the narrowRange option.
      Parameters:
      narrowRange - the narrowRange option
      Returns:
      this Options instance.
    • axis

      public static QuantizeAndDequantize.Options axis(Long axis)
      Sets the axis option.
      Parameters:
      axis - the axis option
      Returns:
      this Options instance.
    • output

      public Output<T> output()
      Gets output.
      Returns:
      output.
    • asOutput

      public Output<T> asOutput()
      Description copied from interface: Operand
      Returns the symbolic handle of the tensor.

      Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

      Specified by:
      asOutput in interface Operand<T extends TNumber>
      See Also: