tf.raw_ops.SparseAccumulatorTakeGradient
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Extracts the average sparse gradient in a SparseConditionalAccumulator.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
tf.compat.v1.raw_ops.SparseAccumulatorTakeGradient
tf.raw_ops.SparseAccumulatorTakeGradient(
handle, num_required, dtype, name=None
)
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.
Args |
handle
|
A Tensor of type mutable string .
The handle to a SparseConditionalAccumulator.
|
num_required
|
A Tensor of type int32 .
Number of gradients required before we return an aggregate.
|
dtype
|
A tf.DType from: tf.float32, tf.float64, tf.int32, tf.uint8, tf.int16, tf.int8, tf.complex64, tf.int64, tf.qint8, tf.quint8, tf.qint32, tf.bfloat16, tf.qint16, tf.quint16, tf.uint16, tf.complex128, tf.half, tf.uint32, tf.uint64 .
The data type of accumulated gradients. Needs to correspond to the type
of the accumulator.
|
name
|
A name for the operation (optional).
|
Returns |
A tuple of Tensor objects (indices, values, shape).
|
indices
|
A Tensor of type int64 .
|
values
|
A Tensor of type dtype .
|
shape
|
A Tensor of type int64 .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-01-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[]]