tf.contrib.eager.save_network_checkpoint( network, save_path, global_step=None, map_func=None )
Defined in tensorflow/contrib/eager/python/network.py
.
Save variables from the Network to a checkpoint.
network
: A Network object to save.save_path
: Either a checkpoint prefix or the name of a directory to save the checkpoint in (in which case the checkpoint will be named based on the Network name).global_step
: The global step to use when naming the checkpoint. If None (default), we will first try to get the default global step. If that fails because no default global step exists, then the checkpoint is created without a global step suffix.map_func
: A function mapping fully qualified variable names (e.g. 'my_network_1/dense_1/kernel') to names in the checkpoint. By default (if map_func=None
), the variable prefix for the network being restored (Network.scope_name + '/'
, e.g. 'my_network_1/') is stripped and all other variable names (shared with other Networks) are left unchanged.The checkpoint prefix for the saved checkpoint, which may be passed to Network.restore
.
ValueError
: If the Network has not yet been called, or if map_func results in a name collision.
© 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/save_network_checkpoint