tf.raw_ops.TensorArrayGradWithShape
Creates a TensorArray for storing multiple gradients of values in the given handle.
tf.raw_ops.TensorArrayGradWithShape(
handle, flow_in, shape_to_prepend, source, name=None
)
Similar to TensorArrayGradV3. However it creates an accumulator with an
expanded shape compared to the input TensorArray whose gradient is being
computed. This enables multiple gradients for the same TensorArray to be
calculated using the same accumulator.
Args |
handle
|
A Tensor of type resource .
The handle to the forward TensorArray.
|
flow_in
|
A Tensor of type float32 .
A float scalar that enforces proper chaining of operations.
|
shape_to_prepend
|
A Tensor of type int32 .
An int32 vector representing a shape. Elements in the gradient accumulator will
have shape which is this shape_to_prepend value concatenated with shape of the
elements in the TensorArray corresponding to the input handle.
|
source
|
A string .
The gradient source string, used to decide which gradient TensorArray
to return.
|
name
|
A name for the operation (optional).
|
Returns |
A tuple of Tensor objects (grad_handle, flow_out).
|
grad_handle
|
A Tensor of type resource .
|
flow_out
|
A Tensor of type float32 .
|
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.
[null,null,["Last updated 2024-01-23 UTC."],[],[]]