Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
przepływ tensorowy:: ops:: Akumuluj NV2
#include <math_ops.h>
Zwraca sumę elementarną listy tensorów.
Streszczenie
tf.accumulate_n_v2
wykonuje tę samą operację co tf.add_n
, ale nie czeka, aż wszystkie jego dane wejściowe będą gotowe, przed rozpoczęciem sumowania. Może to zaoszczędzić pamięć, jeśli wejścia są gotowe w różnym czasie, ponieważ minimalna pamięć tymczasowa jest proporcjonalna do rozmiaru wyjściowego, a nie rozmiaru wejściowego.
W odróżnieniu od pierwotnego accumulate_n
, accumulate_n_v2
jest różniczkowalny.
Zwraca Tensor
o tym samym kształcie i typie co elementy danych inputs
.
Argumenty:
- zakres: Obiekt Scope
- dane wejściowe: lista obiektów
Tensor
, każdy o tym samym kształcie i typie. - kształt: Kształt elementów
inputs
.
Zwroty:
Atrybuty publiczne
Funkcje publiczne
węzeł
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Wyjście
operator::tensorflow::Output() const
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::AccumulateNV2 Class Reference\n\ntensorflow::ops::AccumulateNV2\n==============================\n\n`#include \u003cmath_ops.h\u003e`\n\nReturns the element-wise sum of a list of tensors.\n\nSummary\n-------\n\n`tf.accumulate_n_v2` performs the same operation as `tf.add_n`, but does not wait for all of its inputs to be ready before beginning to sum. This can save memory if inputs are ready at different times, since minimum temporary storage is proportional to the output size rather than the inputs size.\n\nUnlike the original `accumulate_n`, `accumulate_n_v2` is differentiable.\n\nReturns a [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of same shape and type as the elements of `inputs`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- inputs: A list of [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) objects, each with same shape and type.\n- shape: Shape of elements of `inputs`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The sum tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AccumulateNV2](#classtensorflow_1_1ops_1_1_accumulate_n_v2_1aa0b3bc0d86d99eb42148d4c9d7423caf)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.2/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` inputs, PartialTensorShape shape)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_accumulate_n_v2_1a8b34be58d7304da7f97f715aae7475af) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [sum](#classtensorflow_1_1ops_1_1_accumulate_n_v2_1acdb8321212157356c76d4ab16bbf887a) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_accumulate_n_v2_1a3488361c0e26fd5b00e136e09ef3dc31)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_accumulate_n_v2_1a320e247fd2d3ca8ad4564e13c9605397)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_accumulate_n_v2_1a877c1f164066934c89ed718f5ffc7352)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### sum\n\n```text\n::tensorflow::Output sum\n``` \n\nPublic functions\n----------------\n\n### AccumulateNV2\n\n```gdscript\n AccumulateNV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList inputs,\n PartialTensorShape shape\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]