Class FakeQuantWithMinMaxVarsGradient

java.lang.Object
org.tensorflow.op.RawOp
org.tensorflow.op.quantization.FakeQuantWithMinMaxVarsGradient
All Implemented Interfaces:
Op

@Operator(group="quantization") public final class FakeQuantWithMinMaxVarsGradient extends RawOp
Compute gradients for a FakeQuantWithMinMaxVars operation.
  • Field Details

  • Constructor Details

    • FakeQuantWithMinMaxVarsGradient

      public FakeQuantWithMinMaxVarsGradient(Operation operation)
  • Method Details

    • create

      Factory method to create a class wrapping a new FakeQuantWithMinMaxVarsGradient operation.
      Parameters:
      scope - current scope
      gradients - Backpropagated gradients above the FakeQuantWithMinMaxVars operation.
      inputs - Values passed as inputs to the FakeQuantWithMinMaxVars operation. min, max: Quantization interval, scalar floats.
      min - The min value
      max - The max value
      options - carries optional attribute values
      Returns:
      a new instance of FakeQuantWithMinMaxVarsGradient
    • numBits

      public static FakeQuantWithMinMaxVarsGradient.Options numBits(Long numBits)
      Sets the numBits option.
      Parameters:
      numBits - The bitwidth of the quantization; between 2 and 8, inclusive.
      Returns:
      this Options instance.
    • narrowRange

      public static FakeQuantWithMinMaxVarsGradient.Options narrowRange(Boolean narrowRange)
      Sets the narrowRange option.
      Parameters:
      narrowRange - Whether to quantize into 2^num_bits - 1 distinct values.
      Returns:
      this Options instance.
    • backpropsWrtInput

      public Output<TFloat32> backpropsWrtInput()
      Gets backpropsWrtInput. Backpropagated gradients w.r.t. inputs: gradients * (inputs >= min && inputs <= max).
      Returns:
      backpropsWrtInput.
    • backpropWrtMin

      public Output<TFloat32> backpropWrtMin()
      Gets backpropWrtMin. Backpropagated gradients w.r.t. min parameter: sum(gradients * (inputs < min)).
      Returns:
      backpropWrtMin.
    • backpropWrtMax

      public Output<TFloat32> backpropWrtMax()
      Gets backpropWrtMax. Backpropagated gradients w.r.t. max parameter: sum(gradients * (inputs > max)).
      Returns:
      backpropWrtMax.