Checkpointable: Utility to gather initialization ops
authorAllen Lavoie <allenl@google.com>
Fri, 23 Feb 2018 23:51:23 +0000 (15:51 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 23 Feb 2018 23:55:25 +0000 (15:55 -0800)
commitbd946a5bd7b59be8bb276fdd93e0a97653dedbfd
treebb34a3f5dba2199b9c3065ed167230974e3ff62c
parent9a84277be2cb8233c5c14270db6fcdff31ab4d93
Checkpointable: Utility to gather initialization ops

A bit safer, since only variables which will be saved get initialized. Graph
building then raises an error when you've used one which won't be saved. Reduces
the need for the global collection.

Makes it a bit easier to deal with initialization when writing graph/eager
agnostic programs.

PiperOrigin-RevId: 186835744
tensorflow/contrib/eager/python/checkpointable_utils.py
tensorflow/contrib/eager/python/checkpointable_utils_test.py
tensorflow/python/framework/test_util.py