LostTech.TensorFlow : API Documentation

Type UniqueNameTracker

Namespace tensorflow.contrib.checkpoint

Parent TrackableDataStructure

Interfaces IUniqueNameTracker

Adds dependencies on trackable objects with name hints.

Useful for creating dependencies with locally unique names.

Example usage:
Show Example
class SlotManager(tf.contrib.checkpoint.Checkpointable): 

def __init__(self): # Create a dependency named "slotdeps" on the container. self.slotdeps = tf.contrib.checkpoint.UniqueNameTracker() slotdeps = self.slotdeps slots = [] slots.append(slotdeps.track(tf.Variable(3.), "x")) # Named "x" slots.append(slotdeps.track(tf.Variable(4.), "y")) slots.append(slotdeps.track(tf.Variable(5.), "x")) # Named "x_1"

Methods

Properties

Public instance methods

object track(Dense trackable, string base_name)

Add a dependency on `trackable`.
Parameters
Dense trackable
An object to add a checkpoint dependency on.
string base_name
A name hint, which is uniquified to determine the dependency name.
Returns
object
`trackable`, for chaining.

object track(ResourceVariable trackable, string base_name)

Add a dependency on `trackable`.
Parameters
ResourceVariable trackable
An object to add a checkpoint dependency on.
string base_name
A name hint, which is uniquified to determine the dependency name.
Returns
object
`trackable`, for chaining.

object track_dyn(object trackable, object base_name)

Add a dependency on `trackable`.
Parameters
object trackable
An object to add a checkpoint dependency on.
object base_name
A name hint, which is uniquified to determine the dependency name.
Returns
object
`trackable`, for chaining.

Public properties

IList<Layer> layers get;

object layers_dyn get;

IList<object> losses get;

object losses_dyn get;

IList<object> non_trainable_variables get;

object non_trainable_variables_dyn get;

IList<object> non_trainable_weights get;

object non_trainable_weights_dyn get;

object PythonObject get;

bool trainable get; set;

object trainable_dyn get; set;

object trainable_variables get;

object trainable_variables_dyn get;

IList<object> trainable_weights get;

object trainable_weights_dyn get;

IList<object> updates get;

object updates_dyn get;

object variables get;

object variables_dyn get;

IList<object> weights get;

object weights_dyn get;