org.platanios.tensorflow.api.ops.training.distribute.values
Type of this distributed variable (e.g., per-device or mirrored).
Returns the value on the specified device (defaults to the current device, if not provided.
Index map from devices to variables.
Primary variable.
Data type of this variable.
Creates an op that reads the value of this variable sparsely, using the provided indices
.
Creates an op that reads the value of this variable sparsely, using the provided indices
.
This method should be used when there are multiple reads, or when it is desirable to read the value only after some condition is true.
Indices to use for the sparse read.
Name for the created op.
Created op.
Graph where this variable is defined.
Value of the initialized variable.
Value of the initialized variable. You should use this instead of the variable itself to initialize another variable with a value that depends on the value of this variable.
Example:
// Initialize `v` with random values, and then use `initializedValue` to guarantee that `v` has been initialized // before its value is used to initialize `w`. The random tensor will only be sampled once. val v = tf.variable("v", FLOAT32, Shape(10, 40), tf.RandomTruncatedNormalInitializer()) val w = tf.variable("w", initializer = tf.ConstantInitializer(v.initializedValue * 2.0))
Returns the initializer for this variable.
Op output that is true
when the variable has been initialized and false
otherwise.
Name of this variable.
Returns the op of this variable.
Creates an op that reads the value of this variable.
Creates an op that reads the value of this variable.
This method should be used when there are multiple reads, or when it is desirable to read the value only after some condition is true.
The returned value may be different from that of value depending on the device being used, the control dependencies, etc.
Created op.
Shape of this variable.
Alias for toVariableDef
.
Converts this object to its corresponding ProtoBuf object.
Converts this object to its corresponding ProtoBuf object.
ProtoBuf object corresponding to this object.
Convert this object to its corresponding ProtoBuf object.
Convert this object to its corresponding ProtoBuf object.
Optional string specifying the name scope to remove. Only the ops within this name scope will be included in the resulting ProtoBuf object and the export scope will be stripped from their names to allow for easy import into new name scopes.
ProtoBuf object corresponding to this object.
Returns a cached op which reads the last value of this partitioned variable.
Returns a cached op which reads the last value of this partitioned variable.
You can not assign a new value to the returned tensor as it is not a reference to the variable.
The returned op output will not inherit the control dependencies from the scope where the value is used, which is equivalent behavior to that of getting the value of a variable.
NOTE: You usually do not need to call this method directly, as all ops that use variables do so by internally converting them to tensors.
Holds a map from devices to variables.