ConditionalAccumulator


tensorflow C++ API

tensorflow::ops::ConditionalAccumulator

A conditional accumulator for aggregating gradients.


Summary

The accumulator accepts gradients marked with local_step greater or equal to the most recent global_step known to the accumulator. The average can be extracted from the accumulator, provided sufficient gradients have been accumulated. Extracting the average automatically resets the aggregate to 0, and increments the global_step recorded by the accumulator.

Arguments:

  • scope: A Scope object
  • dtype: The type of the value being accumulated.
  • shape: The shape of the values, can be [], in which case shape is unknown.

Optional attributes (seeAttrs):

  • container: If non-empty, this queue is placed in the given container. Otherwise, a default container is used.
  • shared_name: If non-empty, this queue will be shared under the given name across multiple sessions.

Returns:

  • Output : The handle to the accumulator.

Constructor

  • ConditionalAccumulator(const ::tensorflow::Scope & scope, DataType dtype, PartialTensorShape shape, const ConditionalAccumulator::Attrs & attrs).

Public attributes

  • tensorflow::Output handle.

ConditionalAccumulator block

Source link : https://github.com/EXPNUNI/enuSpace-Tensorflow/blob/master/enuSpaceTensorflow/tf_data_flow_ops.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • DataType dtype : connect Input node or input DataType.ex) DT_DOUBLE;
  • PartialTensorShape shape : connect Input node or input PartialTensorShape .ex) {2,2};
  • ConditionalAccumulator::Attrs attrs : input attrs data. ex) container_ = ""; shared_name_ = "";

Return:

  • Output handle: Output handle of ConditionalAccumulator class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""