Checkpointable: Utility to split a dependency for saving/loading
authorAllen Lavoie <allenl@google.com>
Tue, 3 Apr 2018 22:28:27 +0000 (15:28 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 3 Apr 2018 22:31:14 +0000 (15:31 -0700)
commitbfb63e0a6458ff66e67a79467beab854d7c9d69d
treee2b38ad4bad8dead77fb09e007fe65fe2a51bdee
parent1b20395c19199aaf124b2468da0e1d935c659d7b
Checkpointable: Utility to split a dependency for saving/loading

Useful when a single op produces Tensors which should each be saved under
different objects (or when Tensors saved with many different objects need to be
restored together as inputs to a single op).

I plan to use this for cuDNN RNN saving, which currently relies heavily on name
matching to allow cuDNN cells to be swapped out for CPU-compatible RNN
cells. This change has just the utility and some tests for it.

PiperOrigin-RevId: 191509664
tensorflow/contrib/eager/python/checkpointable_utils.py
tensorflow/contrib/eager/python/checkpointable_utils_test.py