tensorflow::ops::Variable
#include <state_ops.h>
Holds state in the form of a tensor that persists across steps.
Summary
Outputs a ref to the tensor state so it may be read or modified. TODO(zhifengc/mrry): Adds a pointer to a more detail document about sharing states in tensorflow.
Arguments:
- scope: A Scope object
- shape: The shape of the variable tensor.
- dtype: The type of elements in the variable tensor.
Optional attributes (see Attrs
):
- container: If non-empty, this variable is placed in the given container. Otherwise, a default container is used.
- shared_name: If non-empty, this variable is named in the given bucket with this shared_name. Otherwise, the node name is used instead.
Returns:
-
Output
: A reference to the variable tensor.
Constructors and Destructors | |
---|---|
Variable(const ::tensorflow::Scope & scope, PartialTensorShape shape, DataType dtype) | |
Variable(const ::tensorflow::Scope & scope, PartialTensorShape shape, DataType dtype, const Variable::Attrs & attrs) |
Public attributes | |
---|---|
operation | |
ref |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public static functions | |
---|---|
Container(StringPiece x) | |
SharedName(StringPiece x) |
Structs | |
---|---|
tensorflow::ops::Variable::Attrs | Optional attribute setters for Variable. |
Public attributes
operation
Operation operation
ref
::tensorflow::Output ref
Public functions
Variable
Variable( const ::tensorflow::Scope & scope, PartialTensorShape shape, DataType dtype )
Variable
Variable( const ::tensorflow::Scope & scope, PartialTensorShape shape, DataType dtype, const Variable::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
Container
Attrs Container( StringPiece x )
SharedName
Attrs SharedName( StringPiece x )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/variable