FakeQuantWithMinMaxVarsPerChannelGradient

public final class FakeQuantWithMinMaxVarsPerChannelGradient

Compute gradients for a FakeQuantWithMinMaxVarsPerChannel 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 FakeQuantWithMinMaxVarsPerChannelGradient
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 FakeQuantWithMinMaxVarsPerChannelGradient operation.
static FakeQuantWithMinMaxVarsPerChannelGradient.Options
narrowRange(Boolean narrowRange)
static FakeQuantWithMinMaxVarsPerChannelGradient.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: "FakeQuantWithMinMaxVarsPerChannelGradient"

Public Methods

public Output<TFloat32> backpropWrtMax ()

Backpropagated gradients w.r.t. max parameter, shape `[d]`: `sum_per_d(gradients * (inputs > max))`.

public Output<TFloat32> backpropWrtMin ()

Backpropagated gradients w.r.t. min parameter, shape `[d]`: `sum_per_d(gradients * (inputs < min))`.

public Output<TFloat32> backpropsWrtInput ()

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

public static FakeQuantWithMinMaxVarsPerChannelGradient 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 FakeQuantWithMinMaxVarsPerChannelGradient operation.

Parameters
scope current scope
gradients Backpropagated gradients above the FakeQuantWithMinMaxVars operation, shape one of: `[d]`, `[b, d]`, `[b, h, w, d]`.
inputs Values passed as inputs to the FakeQuantWithMinMaxVars operation, shape same as `gradients`. min, max: Quantization interval, floats of shape `[d]`.
options carries optional attributes values
Returns
  • a new instance of FakeQuantWithMinMaxVarsPerChannelGradient

public static FakeQuantWithMinMaxVarsPerChannelGradient.Options narrowRange (Boolean narrowRange)

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

public static FakeQuantWithMinMaxVarsPerChannelGradient.Options numBits (Long numBits)

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