AssignAdd
tensorflow C++ API
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.
Arguments:
- 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.
AssignAdd block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_state.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input ref: connect Input node.
- Input value: connect Input node.
- AssignAdd ::Attrs attrs : Input attrs in value. ex)use_locking_ = true;
Return:
- Output output : Output object of AssignAdd class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.