Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
aliran tensor:: operasi:: AkumulasiNV2
#include <math_ops.h>
Mengembalikan jumlah elemen dari daftar tensor.
Ringkasan
tf.accumulate_n_v2
melakukan operasi yang sama seperti tf.add_n
, tetapi tidak menunggu semua inputnya siap sebelum mulai menjumlahkan. Hal ini dapat menghemat memori jika masukan siap pada waktu yang berbeda, karena penyimpanan sementara minimum sebanding dengan ukuran keluaran, bukan ukuran masukan.
Berbeda dengan accumulate_n
asli, accumulate_n_v2
dapat dibedakan.
Mengembalikan Tensor
dengan bentuk dan tipe yang sama dengan elemen inputs
.
Argumen:
- ruang lingkup: Objek Lingkup
- inputs : Daftar objek
Tensor
, masing-masing dengan bentuk dan tipe yang sama. - bentuk : Bentuk elemen
inputs
.
Pengembalian:
Atribut publik
Fungsi publik
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Keluaran
operator::tensorflow::Output() const
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 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.1/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.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- inputs: A list of [Tensor](/versions/r2.1/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.1/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.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.1/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.1/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.1/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```"]]