Assign


tensorflow C++ API

tensorflow::ops::Assign

Update 'ref' by assigning 'value' to it.


Summary

This operation outputs "ref" after the assignment 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. May be uninitialized.
  • value: The value to be assigned to the variable.

Optional attributes (see Attrs):

  • validate_shape: If true, the operation will validate that the shape of 'value' matches the shape of the Tensor being assigned to. If false, 'ref' will take on the shape of 'value'.
  • use_locking: If True, the assignment 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 reset.

Assign 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.
  • Assign ::Attrs attrs : Input attrs in value. ex) validate_shape_ = true;use_locking_ = true;

Return:

  • Output output : Output object of Assign class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""