Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Fix formatting in programmers_guide/debugger #18281

Merged
merged 2 commits into from
Apr 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
61 changes: 30 additions & 31 deletions tensorflow/docs_src/programmers_guide/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,28 @@

[TOC]

TensorFlow debugger (**tfdbg**) is a specialized debugger for TensorFlow. It
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: 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.

> NOTE: This guide focuses on the command-line interface (CLI) of tfdbg. For
> guide on how to use the graphical user interface (GUI) of tfdbg, i.e., the
> **TensorBoard Debugger Plugin**, please visit
> [its README](https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/debugger/README.md).
`tfdbg` is a specialized debugger for TensorFlow. It 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.

This guide focuses on the command-line interface (CLI) of `tfdbg`. For guide on
how to use the graphical user interface (GUI) of tfdbg, i.e., the
**TensorBoard Debugger Plugin**, please visit
[its README](https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/debugger/README.md).

Note: The 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** CLI to debug the appearance
of [`nan`s](https://en.wikipedia.org/wiki/NaN)
Expand Down Expand Up @@ -748,16 +747,16 @@ There are three possible workarounds or solutions:
to which tfdbg dumps the debug data. You can use it to let tfdbg dump the
debug data on a disk with larger free space. For example:

``` python
# For LocalCLIDebugWrapperSession
sess = tf_debug.LocalCLIDebugWrapperSession(dump_root="/with/lots/of/space")

# For LocalCLIDebugHook
hooks = [tf_debug.LocalCLIDebugHook(dump_root="/with/lots/of/space")]
```
```python
# For LocalCLIDebugWrapperSession
sess = tf_debug.LocalCLIDebugWrapperSession(dump_root="/with/lots/of/space")

# For LocalCLIDebugHook
hooks = [tf_debug.LocalCLIDebugHook(dump_root="/with/lots/of/space")]
```
Make sure that the directory pointed to by dump_root is empty or nonexistent.
tfdbg cleans up the dump directories before exiting.
`tfdbg` cleans up the dump directories before exiting.

* Reduce the batch size used during the runs.
* Use the filtering options of tfdbg's `run` command to watch only specific
nodes in the graph. For example:
Expand Down