Compute gradients for a FakeQuantWithMinMaxVarsPerChannel operation.
Nested Classes
class | FakeQuantWithMinMaxVarsPerChannelGradient.Options | Optional attributes for FakeQuantWithMinMaxVarsPerChannelGradient
|
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 | |
static FakeQuantWithMinMaxVarsPerChannelGradient.Options |
narrowRange(Boolean narrowRange)
|
static FakeQuantWithMinMaxVarsPerChannelGradient.Options |
numBits(Long numBits)
|
Inherited Methods
Constants
public static final String OP_NAME
The name of this op, as known by TensorFlow core engine
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. |
---|