org.platanios.tensorflow.api.ops.variables
Gets or creates a partitioned variable.
Gets or creates a partitioned variable.
Variable name.
Variable data type.
Variable shape.
Variable initializer. If initializer
is null
(the default), the default initializer
passed in the constructor is used. If that one is null
too, then we use a new
glorotUniformInitializer
. The initializer will be called for each part of the partitioned
variable separately.
Variable regularizer.
Function that accepts a fully defined Shape
and returns a sequence of integers (i.e., the
partitions
). These integers describe how to partition the given variable, along the each
dimension. That is, partitions(1) = 3
means that we split the variable into 3
parts
along dimension 1
. Currently, partitioning along only a single axis is supported.
If true
, the default, the variable is added to the graph collection
Graph.Keys.TRAINABLE_VARIABLES
. This collection is used as the default set of variables
to use by the optimizers.
Reuse value indicating whether to re-use an existing variable with the same name, create a new variable, or do either.
Set of graph collections keys. The variable is added to these collections. Defaults to
Set(Graph.Keys.GLOBAL_VARIABLES)
.
Device specification describing where the variable should be cached for reading. Defaults
to the variable's device. Typical use is to cache on the device where the ops using the
variable reside, to deduplicate copying through Switch
and other conditional statements.
Requested variable.
IllegalArgumentException
If any of the provided arguments are not compatible with each other, or with the
variables stored in this variable store.
InvalidDataTypeException
If the provided data type does not match the data type of the corresponding
variable stored in this variable store (if there exists one).
ShapeMismatchException
If the provided shape does not match the shape of the corresponding variable
stored in this variable store (if there exists one).
Gets or creates a variable.
Gets or creates a variable.
Variable name.
Variable data type.
Variable shape.
Variable initializer. If initializer
is null
(the default), the default initializer
passed in the constructor is used. If that one is null
too, then we use a new
glorotUniformInitializer
. The initializer will be called for each part of the partitioned
variable separately.
Variable regularizer.
If true
, the default, the variable is added to the graph collection
Graph.Keys.TRAINABLE_VARIABLES
. This collection is used as the default set of variables
to use by the optimizers.
Reuse value indicating whether to re-use an existing variable with the same name, create a new variable, or do either.
Set of graph collections keys. The variable is added to these collections. Defaults to
Set(Graph.Keys.GLOBAL_VARIABLES)
.
Device specification describing where the variable should be cached for reading. Defaults
to the variable's device. Typical use is to cache on the device where the ops using the
variable reside, to deduplicate copying through Switch
and other conditional statements.
Requested variable.
IllegalArgumentException
If any of the provided arguments are not compatible with each other, or with the
variables stored in this variable store.
InvalidDataTypeException
If the provided data type does not match the data type of the corresponding
variable stored in this variable store (if there exists one).
ShapeMismatchException
If the provided shape does not match the shape of the corresponding variable
stored in this variable store (if there exists one).
Variable store that carries a number of named variables.