ScheduledVariable

class tfsnippet.ScheduledVariable(name, initial_value, dtype=tf.float32, model_var=False, collections=None, **kwargs)

Bases: tfsnippet.utils.tensor_wrapper.TensorWrapper

A non-trainable tf.Variable, whose value might need to be changed as training goes by.

Attributes Summary

tensor Get the wrapped tf.Tensor.
variable Get the TensorFlow variable object.

Methods Summary

get() Get the current value of the variable.
set(value) Set the value of the variable.

Attributes Documentation

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.