AnnealingVariable¶
-
class
tfsnippet.
AnnealingVariable
(name, initial_value, ratio, min_value=None, dtype=tf.float32, model_var=False, collections=None)¶ Bases:
tfsnippet.scaffold.scheduled_var.ScheduledVariable
A non-trainable
tf.Variable
, whose value will be annealed as training goes by.Attributes Summary
assign_op
Get the assignment operation. assign_ph
Get the assignment placeholder. tensor
Get the wrapped tf.Tensor
.variable
Get the TensorFlow variable object. Methods Summary
anneal
()Anneal the value. 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
-
anneal
()¶ Anneal the value.
Returns: The new value of the variable.
-
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.
-