tf.compat.v1.ConditionalAccumulatorBase

A conditional accumulator for aggregating gradients.

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.
accumulator_ref A handle to the conditional accumulator, created by sub- classes

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

Methods

num_accumulated

View source

Number of gradients that have currently been aggregated in accumulator.

Args
name Optional name for the operation.