FakeQuantWithMinMaxVarsPerChannelGradient
tensorflow C++ API
tensorflow::ops::FakeQuantWithMinMaxVarsPerChannelGradient
Compute gradients for a FakeQuantWithMinMaxVarsPerChannel operation.
Summary
Arguments:
- scope: A Scope object
- 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 gradientsQuantization interval, floats of shape[d].
Optional attributes (seeAttrs):
- 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:
- Outputbackprops_wrt_input: Backpropagated gradients w.r.t. inputs, shape same as- inputs:- gradients * (inputs >= min && inputs <= max).
- Outputbackprop_wrt_min: Backpropagated gradients w.r.t. min parameter, shape- [d]:- sum_per_d(gradients * (inputs < min)).
- Outputbackprop_wrt_max: Backpropagated gradients w.r.t. max parameter, shape- [d]:- sum_per_d(gradients * (inputs > max)).
FakeQuantWithMinMaxVarsPerChannelGradient 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 FakeQuantWithMinMaxVarsPerChannelGradient class object.
Result:
- std::vector(Tensor) result_output: ATensorof typefloat. This operation has a gradient and thus allows for trainingminandmaxvalues.
Using Method
