message: add code sample on inspect checkpoint variables
diff: @@ -158,6 +158,39 @@ Notes:
  optionally choose names for the variables in the checkpoint files.
  +### Inspect variables in a checkpoint
  +
  +We can quickly inspect variables in a checkpoint with the
  +[`inspect_checkpoint`](https://www.tensorflow.org/code/tensorflow/python/tools/inspect_checkpoint.py) library.
  +
  +Continuing from the save/restore examples shown earlier:
  +
  +```python
  +# import the inspect_checkpoint library
  +from tensorflow.python.tools import inspect_checkpoint as chkp
  +
  +# print all tensors in checkpoint file
  +chkp.print_tensors_in_checkpoint_file("/tmp/model.ckpt", tensor_name='', all_tensors=True)
  +
  +# tensor_name: v1
  +# [ 1. 1. 1.]
  +# tensor_name: v2
  +# [-1. -1. -1. -1. -1.]
  +
  +# print only tensor v1 in checkpoint file
  +chkp.print_tensors_in_checkpoint_file("/tmp/model.ckpt", tensor_name='v1', all_tensors=False)
  +
  +# tensor_name: v1
  +# [ 1. 1. 1.]
  +
  +# print only tensor v2 in checkpoint file
  +chkp.print_tensors_in_checkpoint_file("/tmp/model.ckpt", tensor_name='v2', all_tensors=False)
  +
  +# tensor_name: v2
  +# [-1. -1. -1. -1. -1.]
  +```
  +
  +
  <a name="models"></a>
  ## Overview of saving and restoring models
  