Stop Model.save_weights from printing a deprication warning (TF format)

Also has it save relative paths in the checkpoint proto, which removes a behavior difference between it and CheckpointManager.

PiperOrigin-RevId: 227586345
This commit is contained in:
Allen Lavoie 2019-01-02 14:53:55 -08:00 committed by TensorFlower Gardener
parent 85ca0e9b81
commit 790a635a04

View File

@ -1382,9 +1382,10 @@ class Network(base_layer.Layer):
% (optimizer,))
self._checkpointable_saver.save(filepath, session=session)
# Record this checkpoint so it's visible from tf.train.latest_checkpoint.
checkpoint_management.update_checkpoint_state(
checkpoint_management.update_checkpoint_state_internal(
save_dir=os.path.dirname(filepath),
model_checkpoint_path=filepath,
save_relative_paths=True,
all_model_checkpoint_paths=[filepath])
def load_weights(self, filepath, by_name=False):