Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
dòng chảy căng:: ôi:: Tích lũyNV2
#include <math_ops.h>
Trả về tổng theo từng phần tử của một danh sách các tensor.
Bản tóm tắt
tf.accumulate_n_v2
thực hiện thao tác tương tự như tf.add_n
, nhưng không đợi tất cả đầu vào của nó sẵn sàng trước khi bắt đầu tính tổng. Điều này có thể tiết kiệm bộ nhớ nếu đầu vào sẵn sàng vào các thời điểm khác nhau, vì bộ nhớ tạm thời tối thiểu tỷ lệ thuận với kích thước đầu ra hơn là kích thước đầu vào.
Không giống như accumulate_n
ban đầu, accumulate_n_v2
có thể phân biệt được.
Trả về một Tensor
có hình dạng và kiểu giống như các phần tử của inputs
.
Lập luận:
- phạm vi: Một đối tượng phạm vi
- đầu vào: Danh sách các đối tượng
Tensor
, mỗi đối tượng có hình dạng và kiểu giống nhau. - hình dạng: Hình dạng của các phần tử
inputs
.
Trả về:
Thuộc tính công khai
Chức năng công cộng
nút
::tensorflow::Node * node() const
operator::tensorflow::Input() const
toán tử::tenorflow::Đầu ra
operator::tensorflow::Output() const
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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```"]]