Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
przepływ tensorowy:: ops:: TensorArrayGradWithShape
#include <data_flow_ops.h>
Tworzy obiekt TensorArray do przechowywania wielu gradientów wartości w danym uchwycie.
Streszczenie
Podobny do TensorArrayGradV3. Tworzy jednak akumulator o rozszerzonym kształcie w porównaniu z wejściowym TensorArray , którego gradient jest obliczany. Umożliwia to obliczenie wielu gradientów dla tego samego TensorArray przy użyciu tego samego akumulatora.
Argumenty:
- zakres: Obiekt Scope
- uchwyt: uchwyt do przodu TensorArray .
- flow_in: Skalar typu float, który wymusza prawidłowe łączenie operacji.
- Shape_to_prepend: wektor int32 reprezentujący kształt. Elementy w akumulatorze gradientu będą miały kształt, który jest wartością kształtu_do_prepend połączoną z kształtem elementów w TensorArray odpowiadającym uchwytowi wejściowemu.
- source: ciąg źródłowy gradientu używany do decydowania, który gradient TensorArray ma zostać zwrócony.
Zwroty:
Atrybuty publiczne
Funkcje publiczne
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-27 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.3/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.3/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.3/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.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to the forward [TensorArray](/versions/r2.3/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.3/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.3/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.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) grad_handle\n- [Output](/versions/r2.3/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.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` flow_in, ::`[tensorflow::Input](/versions/r2.3/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.3/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.3/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.3/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```"]]