FakeQuantWithMinMaxVarsGradient

public final class FakeQuantWithMinMaxVarsGradient

Compute gradients for a FakeQuantWithMinMaxVars operation.

Nested Classes

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

Output<TFloat32>
backpropWrtMax()
Backpropagated gradients w.r.t.
Output<TFloat32>
backpropWrtMin()
Backpropagated gradients w.r.t.
Output<TFloat32>
backpropsWrtInput()
Backpropagated gradients w.r.t.
static FakeQuantWithMinMaxVarsGradient
create(Scope scope, Operand<TFloat32> gradients, Operand<TFloat32> inputs, Operand<TFloat32> min, Operand<TFloat32> max, Options... options)
Factory method to create a class wrapping a new FakeQuantWithMinMaxVarsGradient operation.
static FakeQuantWithMinMaxVarsGradient.Options
narrowRange(Boolean narrowRange)
static FakeQuantWithMinMaxVarsGradient.Options
numBits(Long numBits)

Inherited Methods

org.tensorflow.op.RawOp
final boolean
equals(Object obj)
final int
Operation
op()
Return this unit of computation as a single Operation.
final String
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.op.Op
abstract ExecutionEnvironment
env()
Return the execution environment this op was created in.
abstract Operation
op()
Return this unit of computation as a single Operation.

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "FakeQuantWithMinMaxVarsGradient"

Public Methods

public Output<TFloat32> backpropWrtMax ()

Backpropagated gradients w.r.t. max parameter: `sum(gradients * (inputs > max))`.

public Output<TFloat32> backpropWrtMin ()

Backpropagated gradients w.r.t. min parameter: `sum(gradients * (inputs < min))`.

public Output<TFloat32> backpropsWrtInput ()

Backpropagated gradients w.r.t. inputs: `gradients * (inputs >= min && inputs <= max)`.

public static FakeQuantWithMinMaxVarsGradient create (Scope scope, Operand<TFloat32> gradients, Operand<TFloat32> inputs, Operand<TFloat32> min, Operand<TFloat32> max, Options... options)

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.
options carries optional attributes values
Returns
  • a new instance of FakeQuantWithMinMaxVarsGradient

public static FakeQuantWithMinMaxVarsGradient.Options narrowRange (Boolean narrowRange)

Parameters
narrowRange Whether to quantize into 2^num_bits - 1 distinct values.

public static FakeQuantWithMinMaxVarsGradient.Options numBits (Long numBits)

Parameters
numBits The bitwidth of the quantization; between 2 and 8, inclusive.