LostTech.TensorFlow : API Documentation

Type ConditionalAccumulatorBase

Namespace tensorflow

Parent PythonObjectContainer

Interfaces IConditionalAccumulatorBase

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.

Methods

Properties

Public instance methods

Tensor num_accumulated(string name)

Number of gradients that have currently been aggregated in accumulator.
Parameters
string name
Optional name for the operation.
Returns
Tensor
Number of accumulated gradients currently in accumulator.

object num_accumulated_dyn(object name)

Number of gradients that have currently been aggregated in accumulator.
Parameters
object name
Optional name for the operation.
Returns
object
Number of accumulated gradients currently in accumulator.

object set_global_step(BaseResourceVariable new_global_step, string name)

Sets the global time step of the accumulator.

The operation logs a warning if we attempt to set to a time step that is lower than the accumulator's own time step.
Parameters
BaseResourceVariable new_global_step
Value of new time step. Can be a variable or a constant
string name
Optional name for the operation.
Returns
object
Operation that sets the accumulator's time step.

object set_global_step(int new_global_step, string name)

Sets the global time step of the accumulator.

The operation logs a warning if we attempt to set to a time step that is lower than the accumulator's own time step.
Parameters
int new_global_step
Value of new time step. Can be a variable or a constant
string name
Optional name for the operation.
Returns
object
Operation that sets the accumulator's time step.

object set_global_step(IGraphNodeBase new_global_step, string name)

Sets the global time step of the accumulator.

The operation logs a warning if we attempt to set to a time step that is lower than the accumulator's own time step.
Parameters
IGraphNodeBase new_global_step
Value of new time step. Can be a variable or a constant
string name
Optional name for the operation.
Returns
object
Operation that sets the accumulator's time step.

object set_global_step_dyn(object new_global_step, object name)

Sets the global time step of the accumulator.

The operation logs a warning if we attempt to set to a time step that is lower than the accumulator's own time step.
Parameters
object new_global_step
Value of new time step. Can be a variable or a constant
object name
Optional name for the operation.
Returns
object
Operation that sets the accumulator's time step.

Public properties

object accumulator_ref get;

The underlying accumulator reference.

object accumulator_ref_dyn get;

The underlying accumulator reference.

object dtype get;

The datatype of the gradients accumulated by this accumulator.

object dtype_dyn get;

The datatype of the gradients accumulated by this accumulator.

string name get;

The name of the underlying accumulator.

object name_dyn get;

The name of the underlying accumulator.

object PythonObject get;