# tf.contrib.checkpoint.dot_graph_from_checkpoint

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/checkpoint/python/visualize.py#L25-L99) |

Visualizes an object-based checkpoint (from [`tf.train.Checkpoint`](https://www.tensorflow.org/versions/r1.15/api_docs/python/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

<br />

<br />

<br />

| ## Args ||
|---|---|
| `save_path` | The checkpoint prefix, as returned by [`tf.train.Checkpoint.save`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/train/Checkpoint#save) or [`tf.train.latest_checkpoint`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/train/latest_checkpoint). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A graph in DOT format as a string. ||

<br />