SparseAccumulatorTakeGradient


tensorflow C++ API

tensorflow::ops::SparseAccumulatorTakeGradient

Extracts the average sparse gradient in a SparseConditionalAccumulator.


Summary

The op will blocks until sufficient (i.e., more than num_required) gradients have been accumulated. If the accumulator has already aggregated more than num_required gradients, it will return its average of the accumulated gradients. Also automatically increments the recorded global_step in the accumulator by 1, and resets the aggregate to 0.

Arguments:

  • scope: A Scope object
  • handle: The handle to a SparseConditionalAccumulator.
  • num_required: Number of gradients required before we return an aggregate.
  • dtype: The data type of accumulated gradients. Needs to correspond to the type of the accumulator.

Returns:

  • Outputindices: Indices of the average of the accumulated sparse gradients.
  • Outputvalues: Values of the average of the accumulated sparse gradients.
  • Outputshape: Shape of the average of the accumulated sparse gradients.

Constructor

  • SparseAccumulatorTakeGradient(const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input num_required, DataType dtype).

Public attributes

  • tensorflow::Output indices.
  • tensorflow::Output shape.
  • tensorflow::Output values.

SparseAccumulatorTakeGradient 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.)
  • handle : connect Input node.
  • num_required : connect Input node or input a int64 number.
  • DataType dtype: connect Input node or input DataType. ex) DT_DOUBLE

Return:

  • Operation operation: Operation operation of SparseAccumulatorTakeGradientclass object.

Result:

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

Using Method

results matching ""

    No results matching ""