Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::Add
#include <math_ops.h>
Returns x + y element-wise.
Summary
NOTE: Add
supports broadcasting. AddN
does not. More about broadcasting here
Given two input tensors, the tf.add
operation computes the sum for every element in the tensor.
Both input and output have a range (-inf, inf)
.
Args:
Returns:
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::Add Class Reference\n\ntensorflow::ops::Add\n====================\n\n`#include \u003cmath_ops.h\u003e`\n\nReturns x + y element-wise.\n\nSummary\n-------\n\n*NOTE* : [Add](/versions/r2.14/api_docs/cc/class/tensorflow/ops/add#classtensorflow_1_1ops_1_1_add) supports broadcasting. [AddN](/versions/r2.14/api_docs/cc/class/tensorflow/ops/add-n#classtensorflow_1_1ops_1_1_add_n) does not. More about broadcasting [here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)\n\nGiven two input tensors, the `tf.add` operation computes the sum for every element in the tensor.\n\nBoth input and output have a range `(-inf, inf)`.\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The z tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Add](#classtensorflow_1_1ops_1_1_add_1a22a7ff05cc6f6e5c5323fc98a71521c4)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` y)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_add_1a4fefd3ff7af9d37b374db299a36ddaee) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [z](#classtensorflow_1_1ops_1_1_add_1a85470018581f846e818de93be3cbbda9) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_add_1a516d025bfd4e035ba7152a277319bdee)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_add_1a55fd96e0d14ff73d6aef1087952b6db2)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_add_1a6873696b8a1abc00d654d99bc533697b)`() const ` | |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### z\n\n```text\n::tensorflow::Output z\n``` \n\nPublic functions\n----------------\n\n### Add\n\n```gdscript\n Add(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n ::tensorflow::Input y\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```"]]