A conditional accumulator for aggregating gradients.

Inherits From: ConditionalAccumulatorBase

Up-to-date gradients (i.e., time step at which gradient was computed is equal to the accumulator's time step) are added to the accumulator.

Extraction of the average gradient is blocked until the required number of gradients has been accumulated.

dtype Datatype of the accumulated gradients.
shape Shape of the accumulated gradients.
shared_name Optional. If non-empty, this accumulator will be shared under the given name across multiple sessions.
name Optional name for the accumulator.
reduction_type Reduction type to use when taking the gradient.

accumulator_ref The underlying accumulator reference.
dtype The datatype of the gradients accumulated by this accumulator.
name The name of the underlying accumulator.



View source

Attempts to apply a gradient to the accumulator.

The attempt is sile