ScheduledVariable¶
-
class
tfsnippet.ScheduledVariable(name, initial_value, dtype=tf.float32, model_var=False, collections=None)¶ Bases:
tfsnippet.utils.tensor_wrapper.TensorWrapperA non-trainable
tf.Variable, whose value might need to be changed as training goes by.Attributes Summary
assign_opGet the assignment operation. assign_phGet the assignment placeholder. tensorGet the wrapped tf.Tensor.variableGet the TensorFlow variable object. Methods Summary
get()Get the current value of the variable. set(value)Set the value of the variable. Attributes Documentation
-
assign_op¶ Get the assignment operation.
Returns: The assignment operation. Return type: tf.Operation
-
assign_ph¶ Get the assignment placeholder.
Returns: The assignment placeholder. Return type: tf.Tensor
-
tensor¶ Get the wrapped
tf.Tensor. Derived classes must override this to return the actual wrapped tensor.Returns: The wrapped tensor. Return type: tf.Tensor
-
variable¶ Get the TensorFlow variable object.
Returns: The TensorFlow variable object. Return type: tf.Variable
Methods Documentation
-
get()¶ Get the current value of the variable.
-
set(value)¶ Set the value of the variable.
Parameters: value – The value to be assigned to the variable. Returns: The new value assigned to the variable.
-