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:: thêmN
#include <math_ops.h>
Thêm tất cả phần tử tensor đầu vào một cách khôn ngoan.
Bản tóm tắt
Đầu vào phải có cùng kích thước và hình dạng.
x = [9, 7, 10]
tf.math.add_n(x) ==> 26
Lập luận:
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-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::AddN Class Reference\n\ntensorflow::ops::AddN\n=====================\n\n`#include \u003cmath_ops.h\u003e`\n\n[Add](/versions/r1.15/api_docs/cc/class/tensorflow/ops/add#classtensorflow_1_1ops_1_1_add) all input tensors element wise.\n\nSummary\n-------\n\nInputs must be of same size and shape.\n\n\n```scdoc\n x = [9, 7, 10]\n tf.math.add_n(x) ==\u003e 26\n \n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The sum tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AddN](#classtensorflow_1_1ops_1_1_add_n_1a4deb1509689964000fe0ba7f9e6cc389)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r1.15/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` inputs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_add_n_1a6b5c41c59d7668a8daa548dc97c3dc29) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [sum](#classtensorflow_1_1ops_1_1_add_n_1ad45f4b4b33007f7bbe3d87cfdee5550f) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_add_n_1a6d9d07e9f1a37f6dfa533fab704c6962)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_add_n_1af8279db594037317319083a18ad2173e)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_add_n_1a601981a899a6788c21d9b3abdbb5cca8)`() 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### AddN\n\n```gdscript\n AddN(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList inputs\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```"]]