جریان تنسور:: عملیات:: TensorArrayGradWithShape
#include <data_flow_ops.h>
یک TensorArray برای ذخیره چندین گرادیان مقادیر در دسته داده شده ایجاد می کند.
خلاصه
مشابه TensorArrayGradV3. با این حال، در مقایسه با TensorArray ورودی که گرادیان آن محاسبه میشود، یک انباشتهکننده با شکل گسترش یافته ایجاد میکند. این باعث می شود چندین گرادیان برای یک TensorArray یکسان با استفاده از یک انباشته محاسبه شود.
استدلال ها:
- scope: یک شی Scope
- handle: دسته به سمت جلو TensorArray .
- flow_in: یک اسکالر شناور که زنجیره مناسب عملیات را اعمال می کند.
- shape_to_prepend: یک بردار int32 که یک شکل را نشان می دهد. عناصر در انباشتگر گرادیان شکلی خواهند داشت که این مقدار shape_to_prepend با شکل عناصر موجود در TensorArray مربوط به دسته ورودی است.
- منبع: رشته منبع گرادیان که برای تصمیم گیری اینکه کدام گرادیان TensorArray را برگرداند استفاده می شود.
برمیگرداند:
سازندگان و ویرانگرها | |
---|---|
TensorArrayGradWithShape (const :: tensorflow::Scope & scope, :: tensorflow::Input handle, :: tensorflow::Input flow_in, :: tensorflow::Input shape_to_prepend, StringPiece source) |
صفات عمومی | |
---|---|
flow_out | |
grad_handle | |
operation |
صفات عمومی
flow_out
::tensorflow::Output flow_out
grad_handle
::tensorflow::Output grad_handle
عملیات
Operation operation
توابع عمومی
TensorArrayGradWithShape
TensorArrayGradWithShape( const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input flow_in, ::tensorflow::Input shape_to_prepend, StringPiece source )
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],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.1/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.1/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.1/api_docs/cc/class/tensorflow/ops/tensor-array#classtensorflow_1_1ops_1_1_tensor_array) to be calculated using the same accumulator.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to the forward [TensorArray](/versions/r2.1/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.1/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.1/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.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) grad_handle\n- [Output](/versions/r2.1/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.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` flow_in, ::`[tensorflow::Input](/versions/r2.1/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.1/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.1/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.1/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```"]]