Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::AssignAdd
#include <state_ops.h>
Update 'ref' by adding 'value' to it.
Summary
This operation outputs "ref" after the update is done. This makes it easier to chain operations that need to use the reset value.
Args:
- scope: A Scope object
- ref: Should be from a
Variable
node.
- value: The value to be added to the variable.
Optional attributes (see Attrs
):
- use_locking: If True, the addition will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
Returns:
Output
: = Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been updated.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
UseLocking
Attrs UseLocking(
bool x
)
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::AssignAdd Class Reference\n\ntensorflow::ops::AssignAdd\n==========================\n\n`#include \u003cstate_ops.h\u003e`\n\nUpdate 'ref' by adding 'value' to it.\n\nSummary\n-------\n\nThis operation outputs \"ref\" after the update is done. This makes it easier to chain operations that need to use the reset value.\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- ref: Should be from a [Variable](/versions/r2.14/api_docs/cc/class/tensorflow/ops/variable#classtensorflow_1_1ops_1_1_variable) node.\n- value: The value to be added to the variable.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/assign-add/attrs#structtensorflow_1_1ops_1_1_assign_add_1_1_attrs)):\n\n- use_locking: If True, the addition will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): = Same as \"ref\". Returned as a convenience for operations that want to use the new value after the variable has been updated.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AssignAdd](#classtensorflow_1_1ops_1_1_assign_add_1aa91b47049ecb93fa5824ad36b535fcdd)`(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)` ref, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` value)` ||\n| [AssignAdd](#classtensorflow_1_1ops_1_1_assign_add_1a496735ee41317a1738b5cb3e1786cce0)`(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)` ref, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` value, const `[AssignAdd::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/assign-add/attrs#structtensorflow_1_1ops_1_1_assign_add_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_assign_add_1a45b7ce12f97e5f94dc8398bd60800389) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_ref](#classtensorflow_1_1ops_1_1_assign_add_1ac8fb7dfee31efa93d3e0fd7a964eac0e) | `::`[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_assign_add_1a1e417cd25dea39879dcce25e01cdef03)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_assign_add_1aaa94aa69fe2183ce50f39c1de74fe054)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_assign_add_1acdbb3d9797d903a63d6f4899aa95b028)`() const ` | |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [UseLocking](#classtensorflow_1_1ops_1_1_assign_add_1ad7216775028fbf1db75e7cbbedcd47b2)`(bool x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/assign-add/attrs#structtensorflow_1_1ops_1_1_assign_add_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::AssignAdd::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/assign-add/attrs) | Optional attribute setters for [AssignAdd](/versions/r2.14/api_docs/cc/class/tensorflow/ops/assign-add#classtensorflow_1_1ops_1_1_assign_add). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output_ref\n\n```scdoc\n::tensorflow::Output output_ref\n``` \n\nPublic functions\n----------------\n\n### AssignAdd\n\n```gdscript\n AssignAdd(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input ref,\n ::tensorflow::Input value\n)\n``` \n\n### AssignAdd\n\n```gdscript\n AssignAdd(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input ref,\n ::tensorflow::Input value,\n const AssignAdd::Attrs & attrs\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``` \n\nPublic static functions\n-----------------------\n\n### UseLocking\n\n```text\nAttrs UseLocking(\n bool x\n)\n```"]]