tensorflow::ops::FakeQuantWithMinMaxVarsGradient
#include <array_ops.h>
Compute gradients for a FakeQuantWithMinMaxVars operation.
Summary
Arguments:
- scope: A Scope object
- gradients: Backpropagated gradients above the FakeQuantWithMinMaxVars operation.
- inputs: Values passed as inputs to the FakeQuantWithMinMaxVars operation. min, max: Quantization interval, scalar floats.
Optional attributes (see Attrs
):
- num_bits: The bitwidth of the quantization; between 2 and 8, inclusive.
- narrow_range: Whether to quantize into 2^num_bits - 1 distinct values.
Returns:
-
Output
backprops_wrt_input: Backpropagated gradients w.r.t. inputs:gradients * (inputs >= min && inputs <= max)
. -
Output
backprop_wrt_min: Backpropagated gradients w.r.t. min parameter:sum(gradients * (inputs < min))
. -
Output
backprop_wrt_max: Backpropagated gradients w.r.t. max parameter:sum(gradients * (inputs > max))
.
Constructors and Destructors | |
---|---|
FakeQuantWithMinMaxVarsGradient(const ::tensorflow::Scope & scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max) | |
FakeQuantWithMinMaxVarsGradient(const ::tensorflow::Scope & scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsGradient::Attrs & attrs) |
Public attributes | |
---|---|
backprop_wrt_max | |
backprop_wrt_min | |
backprops_wrt_input | |
operation |
Public static functions | |
---|---|
NarrowRange(bool x) | |
NumBits(int64 x) |
Structs | |
---|---|
tensorflow::ops::FakeQuantWithMinMaxVarsGradient::Attrs | Optional attribute setters for FakeQuantWithMinMaxVarsGradient. |
Public attributes
backprop_wrt_max
::tensorflow::Output backprop_wrt_max
backprop_wrt_min
::tensorflow::Output backprop_wrt_min
backprops_wrt_input
::tensorflow::Output backprops_wrt_input
operation
Operation operation
Public functions
FakeQuantWithMinMaxVarsGradient
FakeQuantWithMinMaxVarsGradient( const ::tensorflow::Scope & scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max )
FakeQuantWithMinMaxVarsGradient
FakeQuantWithMinMaxVarsGradient( const ::tensorflow::Scope & scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsGradient::Attrs & attrs )
Public static functions
NarrowRange
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-vars-gradient