tf.contrib.checkpoint.object_metadata
Stay organized with collections
Save and categorize content based on your preferences.
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)
Returns |
A parsed tf.contrib.checkpoint.TrackableObjectGraph protocol buffer.
|
Raises |
ValueError
|
If an object graph was not found in the checkpoint.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.checkpoint.object_metadata\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/tracking/util.py#L442-L476) |\n\nRetrieves information about the objects in a checkpoint. \n\n tf.contrib.checkpoint.object_metadata(\n save_path\n )\n\n#### Example usage:\n\n object_graph = tf.contrib.checkpoint.object_metadata(\n tf.train.latest_checkpoint(checkpoint_directory))\n ckpt_variable_names = set()\n for node in object_graph.nodes:\n for attribute in node.attributes:\n ckpt_variable_names.add(attribute.full_name)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------|\n| `save_path` | The path to the checkpoint, as returned by `save` or [`tf.train.latest_checkpoint`](../../../tf/train/latest_checkpoint). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A parsed `tf.contrib.checkpoint.TrackableObjectGraph` protocol buffer. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-----------------------------------------------------|\n| `ValueError` | If an object graph was not found in the checkpoint. |\n\n\u003cbr /\u003e"]]