diff options
Diffstat (limited to 'tensorflow/docs_src/programmers_guide/debugger.md')
-rw-r--r-- | tensorflow/docs_src/programmers_guide/debugger.md | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tensorflow/docs_src/programmers_guide/debugger.md b/tensorflow/docs_src/programmers_guide/debugger.md index 1f856bbf3f..25cb72008d 100644 --- a/tensorflow/docs_src/programmers_guide/debugger.md +++ b/tensorflow/docs_src/programmers_guide/debugger.md @@ -9,11 +9,19 @@ lets you view the internal structure and states of running TensorFlow graphs during training and inference, which is difficult to debug with general-purpose debuggers such as Python's `pdb` due to TensorFlow's computation-graph paradigm. -> NOTE: The system requirements of tfdbg on supported external platforms include -> the following. On Mac OS X, the `ncurses` library is required. It can be -> installed with `brew install homebrew/dupes/ncurses`. On Windows, `pyreadline` -> is required. If you use Anaconda3, you can install it with a command +> NOTE: TensorFlow debugger uses a +> [curses](https://en.wikipedia.org/wiki/Curses_\(programming_library\))-based +> text user interface. On Mac OS X, the `ncurses` library is required and can +> be installed with `brew install homebrew/dupes/ncurses`. On Windows, curses +> isn't as well supported, so a +> [readline](https://en.wikipedia.org/wiki/GNU_Readline)-based interface can +> be used with tfdbg by installing `pyreadline` with pip. +> If you use Anaconda3, you can install it with a command > such as `"C:\Program Files\Anaconda3\Scripts\pip.exe" install pyreadline`. +> Unofficial Windows curses packages can be downloaded +> [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses), then subsequently +> installed using `pip install <your_version>.whl`, however curses on Windows +> may not work as reliably as curses on Linux or Mac. This tutorial demonstrates how to use the **tfdbg** command-line interface (CLI) to debug the appearance of [`nan`s](https://en.wikipedia.org/wiki/NaN) @@ -149,6 +157,7 @@ Try the following commands at the `tfdbg>` prompt (referencing the code at | | `pt <tensor>[slicing]` | Print a subarray of tensor, using [numpy](http://www.numpy.org/)-style array slicing. | `pt hidden/Relu:0[0:50,:]` | | | `-a` | Print the entirety of a large tensor, without using ellipses. (May take a long time for large tensors.) | `pt -a hidden/Relu:0[0:50,:]` | | | `-r <range>` | Highlight elements falling into specified numerical range. Multiple ranges can be used in conjunction. | `pt hidden/Relu:0 -a -r [[-inf,-1],[1,inf]]` | +| | `-n <number>` | Print dump corresponding to specified 0-based dump number. Required for tensors with multiple dumps. | `pt -n 0 hidden/Relu:0` | | | `-s` | Include a summary of the numeric values of the tensor (applicable only to non-empty tensors with Boolean and numeric types such as `int*` and `float*`.) | `pt -s hidden/Relu:0[0:50,:]` | | **`@[coordinates]`** | | Navigate to specified element in `pt` output. | `@[10,0]` or `@10,0` | | **`/regex`** | | [less](https://linux.die.net/man/1/less)-style search for given regular expression. | `/inf` | @@ -166,10 +175,12 @@ Try the following commands at the `tfdbg>` prompt (referencing the code at | | `-r` | List the inputs to node, recursively (the input tree.) | `li -r hidden/Relu:0` | | | `-d <max_depth>` | Limit recursion depth under the `-r` mode. | `li -r -d 3 hidden/Relu:0` | | | `-c` | Include control inputs. | `li -c -r hidden/Relu:0` | +| | `-t` | Show op types of input nodes. | `li -t -r hidden/Relu:0` | | **`lo`** | | **List output recipients of node** | | | | `-r` | List the output recipients of node, recursively (the output tree.) | `lo -r hidden/Relu:0` | | | `-d <max_depth>` | Limit recursion depth under the `-r` mode. | `lo -r -d 3 hidden/Relu:0` | | | `-c` | Include recipients via control edges. | `lo -c -r hidden/Relu:0` | +| | `-t` | Show op types of recipient nodes. | `lo -t -r hidden/Relu:0` | | **`ls`** | | **List Python source files involved in node creation.** | | | | `-p <path_pattern>` | Limit output to source files matching given regular-expression path pattern. | `ls -p .*debug_mnist.*` | | | `-n` | Limit output to node names matching given regular-expression pattern. | `ls -n Softmax.*` | |