TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.checkpoint.object_metadata

View source on GitHub

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:

Returns:

A parsed tf.contrib.checkpoint.TrackableObjectGraph protocol buffer.

Raises:

  • ValueError: If an object graph was not found in the checkpoint.