Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::TensorArrayGradWithShape
#include <data_flow_ops.h>
Creates a TensorArray for storing multiple gradients of values in the given handle.
Summary
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:
- scope: A Scope object
- handle: The handle to the forward TensorArray.
- flow_in: A float scalar that enforces proper chaining of operations.
- shape_to_prepend: 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: The gradient source string, used to decide which gradient TensorArray to return.
Returns:
Public attributes
Public functions
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::TensorArrayGradWithShape Class Reference\n\ntensorflow::ops::TensorArrayGradWithShape\n=========================================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nCreates a [TensorArray](/versions/r2.14/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) for storing multiple gradients of values in the given handle.\n\nSummary\n-------\n\nSimilar to TensorArrayGradV3. However it creates an accumulator with an expanded shape compared to the input [TensorArray](/versions/r2.14/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) whose gradient is being computed. This enables multiple gradients for the same [TensorArray](/versions/r2.14/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) to be calculated using the same accumulator.\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to the forward [TensorArray](/versions/r2.14/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array).\n- flow_in: A float scalar that enforces proper chaining of operations.\n- shape_to_prepend: 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](/versions/r2.14/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) corresponding to the input handle.\n- source: The gradient source string, used to decide which gradient [TensorArray](/versions/r2.14/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) to return.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) grad_handle\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) flow_out\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [TensorArrayGradWithShape](#classtensorflow_1_1ops_1_1_tensor_array_grad_with_shape_1ae957f3234c62f254b88ced73dd452371)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` flow_in, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` shape_to_prepend, StringPiece source)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [flow_out](#classtensorflow_1_1ops_1_1_tensor_array_grad_with_shape_1a7e66bafef678a0c4a661598e8d61c4a3) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [grad_handle](#classtensorflow_1_1ops_1_1_tensor_array_grad_with_shape_1a732338604dc6b1ce0db860e97a5df6ec) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_tensor_array_grad_with_shape_1a0430f64eabb7fa21eac6b06e3e01ec04) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\nPublic attributes\n-----------------\n\n### flow_out\n\n```scdoc\n::tensorflow::Output flow_out\n``` \n\n### grad_handle\n\n```scdoc\n::tensorflow::Output grad_handle\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### TensorArrayGradWithShape\n\n```gdscript\n TensorArrayGradWithShape(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input flow_in,\n ::tensorflow::Input shape_to_prepend,\n StringPiece source\n)\n```"]]