FakeQuantWithMinMaxVarsGradient
tensorflow C++ API
tensorflow::ops::FakeQuantWithMinMaxVarsGradient
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 (seeAttrs
):
- num_bits: The bitwidth of the quantization; between 2 and 8, inclusive.
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))
.
FakeQuantWithMinMaxVarsGradient block
Source link :https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_array_ops.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input
inputs
: A Tensor of typefloat
. - Input min : A Tensor of type
float
. - Input max : A Tensor of type
float
. - Attr
attrs
: An optional attribute value- num_bits : An optional int. Defaults to 8.
Attrs use ex)
Output:
- output : Output object of FakeQuantWithMinMaxVarsGradient class object.
Result:
- std::vector(Tensor)
backprops_wrt_input
: ATensor
of typefloat32
. Backpropagated gradients w.r.t. inputs:gradients * inputs >= min && inputs <= max)
. - std::vector(Tensor)
backprop_wrt_min
: ATensor
of typefloat32
. Backpropagated gradients w.r.t. min parameter:sum(gradients * (inputs < min))
. - std::vector(Tensor)
backprop_wrt_max
: ATensor
of typefloat32
. Backpropagated gradients w.r.t. max parameter:sum(gradients * (inputs > max))
.