tensorflow::ops::FakeQuantWithMinMaxVarsPerChannelGradient

#include <array_ops.h>

Compute gradients for a FakeQuantWithMinMaxVarsPerChannel operation.

Summary

Args:

  • 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 gradients. min, max: Quantization interval, floats of shape [d].

Optional attributes (see Attrs):

  • num_bits: The bitwidth of the quantization; between 2 and 16, inclusive.
  • narrow_range: Whether to quantize into 2^num_bits - 1 distinct values.

Returns:

  • Output backprops_wrt_input: Backpropagated gradients w.r.t. inputs, shape same as inputs: gradients * (inputs >= min && inputs <= max).
  • Output backprop_wrt_min: Backpropagated gradients w.r.t. min parameter, shape [d]: sum_per_d(gradients * (inputs < min)).
  • Output backprop_wrt_max: Backpropagated gradients w.r.t. max parameter, shape [d]: sum_per_d(gradients * (inputs > max)).

Constructors and Destructors

FakeQuantWithMinMaxVarsPerChannelGradient(const ::tensorflow::Scope & scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max)
FakeQuantWithMinMaxVarsPerChannelGradient(const ::tensorflow::Scope & scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannelGradient::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::FakeQuantWithMinMaxVarsPerChannelGradient::Attrs

Optional attribute setters for FakeQuantWithMinMaxVarsPerChannelGradient.

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

FakeQuantWithMinMaxVarsPerChannelGradient

 FakeQuantWithMinMaxVarsPerChannelGradient(  const ::tensorflow::Scope & scope,  ::tensorflow::Input gradients,  ::tensorflow::Input inputs,  ::tensorflow::Input min,  ::tensorflow::Input max )

FakeQuantWithMinMaxVarsPerChannelGradient

 FakeQuantWithMinMaxVarsPerChannelGradient(  const ::tensorflow::Scope & scope,  ::tensorflow::Input gradients,  ::tensorflow::Input inputs,  ::tensorflow::Input min,  ::tensorflow::Input max,  const FakeQuantWithMinMaxVarsPerChannelGradient::Attrs & attrs )

Public static functions

NarrowRange

Attrs NarrowRange( bool x )

NumBits

Attrs NumBits( int64 x )