Checkpointable
Defined in tensorflow/python/training/checkpointable.py.
Manages dependencies on other objects.
Checkpointable objects may have dependencies: other Checkpointable objects which should be saved if the object declaring the dependency is saved. A correctly saveable program has a dependency graph such that if changing a global variable affects an object (e.g. changes the behavior of any of its methods) then there is a chain of dependencies from the influenced object to the variable.
Dependency edges have names, and are created implicitly when a Checkpointable object is assigned to an attribute of another Checkpointable object. For example:
obj = Checkpointable() obj.v = ResourceVariable(0.)
The Checkpointable object obj now has a dependency named "v" on a variable.
Checkpointable objects may specify Tensors to be saved and restored directly (e.g. a Variable indicating how to save itself) rather than through dependencies on other objects. See Checkpointable._gather_saveables_for_checkpoint for details.
__setattr____setattr__(
name,
value
)
Support self.foo = checkpointable syntax.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/eager/Checkpointable