tf.contrib.checkpoint.dot_graph_from_checkpoint
Stay organized with collections
Save and categorize content based on your preferences.
Visualizes an object-based checkpoint (from tf.train.Checkpoint
).
tf.contrib.checkpoint.dot_graph_from_checkpoint(
save_path
)
Useful for inspecting checkpoints and debugging loading issues.
Example usage from Python (requires pydot):
import tensorflow as tf
import pydot
dot_string = tf.contrib.checkpoint.dot_graph_from_checkpoint('/path/to/ckpt')
parsed, = pydot.graph_from_dot_data(dot_string)
parsed.write_svg('/tmp/tensorflow/visualized_checkpoint.svg')
Example command line usage:
python -c "import tensorflow as tf;\
print(tf.contrib.checkpoint.dot_graph_from_checkpoint('/path/to/ckpt'))"\
| dot -Tsvg > /tmp/tensorflow/checkpoint_viz.svg
Returns |
A graph in DOT format as a string.
|
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.dot_graph_from_checkpoint\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/checkpoint/python/visualize.py#L25-L99) |\n\nVisualizes an object-based checkpoint (from [`tf.train.Checkpoint`](../../../tf/train/Checkpoint)). \n\n tf.contrib.checkpoint.dot_graph_from_checkpoint(\n save_path\n )\n\nUseful for inspecting checkpoints and debugging loading issues.\n\nExample usage from Python (requires pydot): \n\n import tensorflow as tf\n import pydot\n\n dot_string = tf.contrib.checkpoint.dot_graph_from_checkpoint('/path/to/ckpt')\n parsed, = pydot.graph_from_dot_data(dot_string)\n parsed.write_svg('/tmp/tensorflow/visualized_checkpoint.svg')\n\nExample command line usage: \n\n python -c \"import tensorflow as tf;\\\n print(tf.contrib.checkpoint.dot_graph_from_checkpoint('/path/to/ckpt'))\"\\\n | dot -Tsvg \u003e /tmp/tensorflow/checkpoint_viz.svg\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `save_path` | The checkpoint prefix, as returned by [`tf.train.Checkpoint.save`](../../../tf/train/Checkpoint#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 graph in DOT format as a string. ||\n\n\u003cbr /\u003e"]]