tf.contrib.checkpoint.object_metadata
Retrieves information about the objects in a checkpoint.
tf.contrib.checkpoint.object_metadata( save_path )
Example usage:
object_graph = tf.contrib.checkpoint.object_metadata( tf.train.latest_checkpoint(checkpoint_directory)) ckpt_variable_names = set() for node in object_graph.nodes: for attribute in node.attributes: ckpt_variable_names.add(attribute.full_name)
Args | |
---|---|
save_path |
The path to the checkpoint, as returned by save or tf.train.latest_checkpoint . |
Returns | |
---|---|
A parsed tf.contrib.checkpoint.TrackableObjectGraph protocol buffer. |
Raises | |
---|---|
ValueError |
If an object graph was not found in the checkpoint. |
© 2020 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/versions/r1.15/api_docs/python/tf/contrib/checkpoint/object_metadata