Checkpointable: allow using Checkpointable objects in a tf.train.Saver()
authorAllen Lavoie <allenl@google.com>
Sat, 24 Feb 2018 00:53:21 +0000 (16:53 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Sat, 24 Feb 2018 01:03:48 +0000 (17:03 -0800)
commit4f983f23e05da691868a1e20c56e900bb4afbadd
tree3e5180b57be98fb03162f02a8412d35cbc349dc8
parent18bab99ac33f31192d400aebcfb7670a121655bd
Checkpointable: allow using Checkpointable objects in a tf.train.Saver()

Checkpointable objects in a Saver's var_list will be unpacked into their
SaveableObjects, possibly running some Python logic along the way.

This should help keep the transition from name-based saving smooth: to save
either way, just override CheckpointableBase._gather_saveables_for_checkpoint.

PiperOrigin-RevId: 186843857
tensorflow/python/training/saver.py
tensorflow/python/training/saver_test.py