W3cubDocs

/TensorFlow C++ 1.15

tensorflow::ops::AccumulatorTakeGradient

#include <data_flow_ops.h>

Extracts the average gradient in the given ConditionalAccumulator.

Summary

The op 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 returns the 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 an accumulator.
  • 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:

  • Output: The average of the accumulated gradients.
Constructors and Destructors
AccumulatorTakeGradient(const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input num_required, DataType dtype)
Public attributes
average
operation
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const

Public attributes

average

::tensorflow::Output average

operation

Operation operation

Public functions

AccumulatorTakeGradient

 AccumulatorTakeGradient(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input handle,
  ::tensorflow::Input num_required,
  DataType dtype
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/accumulator-take-gradient