From e2b92ced84ab58d017c07fcc3f3adebca55c1a9c Mon Sep 17 00:00:00 2001 From: Shanqing Cai Date: Fri, 17 Mar 2017 14:43:18 -0800 Subject: [PATCH] tfdbg: update doc images Other minor changes: * Tweaks in the doc about source line annotation * Tweak in the run-start message Change: 150493562 --- tensorflow/docs_src/programmers_guide/debugger.md | 12 +++++++++--- tensorflow/python/debug/cli/cli_shared.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tensorflow/docs_src/programmers_guide/debugger.md b/tensorflow/docs_src/programmers_guide/debugger.md index 65f3d0b7183..7bf3b22e198 100644 --- a/tensorflow/docs_src/programmers_guide/debugger.md +++ b/tensorflow/docs_src/programmers_guide/debugger.md @@ -246,18 +246,21 @@ tfdbg> ni -t cross_entropy/Log The `-t` flag is used by default, if you use the clickable "node_info" menu item at the top of the screen. -From the traceback, you can see that the op is constructed at line 109 of +From the traceback, you can see that the op is constructed around line 106 of [`debug_mnist.py`](https://www.tensorflow.org/code/tensorflow/python/debug/examples/debug_mnist.py): ```python diff = y_ * tf.log(y) ``` -TIP: tfdbg lets you view a Python source file with its lines annotated with +***tfdbg** has a feature that makes it ease to trace Tensors and ops back to +lines in Python source files. It can annotate lines of a Python file with the ops or Tensors created by them. To use this feature, simply click the underlined line numbers in the stack trace output of the `ni -t ` commands, or use the `ps` (or `print_source`) command such as: -`ps /path/to/source.py` +`ps /path/to/source.py`. See the screenshot below for an example of `ps` output: + +![tfdbg run-end UI: annotated Python source file](../images/tfdbg_screenshot_run_end_annotated_source.png) Apply a value clipping on the input to @{tf.log} to resolve this problem: @@ -349,6 +352,9 @@ for more details. * Navigation through command history using the Up and Down arrow keys. Prefix-based navigation is also supported. +* Navigation through history of screen outputs using the `prev` and `next` + commands or by clicking the underlined `<--` and `-->` links near the top + of the screen. * Tab completion of commands and some command arguments. * Write screen output to file by using bash-style redirection. For example: diff --git a/tensorflow/python/debug/cli/cli_shared.py b/tensorflow/python/debug/cli/cli_shared.py index 40af8282056..b1953479502 100644 --- a/tensorflow/python/debug/cli/cli_shared.py +++ b/tensorflow/python/debug/cli/cli_shared.py @@ -301,7 +301,7 @@ def get_run_start_intro(run_call_count, _recommend_command( "run -t ", "Execute run() calls (T - 1) times without debugging, then " - "execute run() one more time and drop back to the CLI")) + "execute run() once more with debugging and drop back to the CLI")) out.extend( _recommend_command( "run -f ", -- GitLab