How do display different runs in TensorBoard?

TensorflowTensorboard

Tensorflow Problem Overview


TensorBoard seems to have a feature to display multiple different runs and toggle them.

enter image description here

How can I make multiple runs show up here and how can assign a name to them to differentiate them?

Tensorflow Solutions


Solution 1 - Tensorflow

In addition to TensorBoard scanning subdirectories (so you can pass a directory containing the directories with your runs), you can also pass multiple directories to TensorBoard explicitly and give custom names (example taken from the --help output):

tensorboard --logdir=name1:/path/to/logs/1,name2:/path/to/logs/2

More information can be found at the TensorBoard documentation.

In recent versions of TensorBoard, aliasing this way requires a different argument, however its use is discouraged (quote from current documentation on github - linked above):

> Logdir & Logdir_spec (Legacy Mode) > > You may also pass a comma separated list of log directories, and > TensorBoard will watch each directory. You can also assign names to > individual log directories by putting a colon between the name and the > path, as in > > tensorboard --logdir_spec name1:/path/to/logs/1,name2:/path/to/logs/2 > > This flag (--logdir_spec) is discouraged and can usually be avoided. > TensorBoard walks log directories recursively; for finer-grained > control, prefer using a symlink tree. Some features may not work when > using --logdir_spec instead of --logdir.

Solution 2 - Tensorflow

I found the answer to my own question on github (https://github.com/tensorflow/tensorflow/issues/1548).

You need to put your logs in a subfolder e.g. /logs/run1/ and then run tensorboard on the root folder e.g. /logs/.

Solution 3 - Tensorflow

New version of tensorboard changed logdir to logdir_spec:

tensorboard --logdir_spec=name1:/path/to/logs/1,name2:/path/to/logs/2

Solution 4 - Tensorflow

It seems that just declaring it like this is ok:

writer = SummaryWriter(logdir='/runs/you_tag')

Then tensorboard will create a you_tag folder below runs/, in the meantime, the web application will refresh and find you_tag.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMaartenView Question on Stackoverflow
Solution 1 - TensorflowetarionView Answer on Stackoverflow
Solution 2 - TensorflowMaartenView Answer on Stackoverflow
Solution 3 - TensorflowOrenView Answer on Stackoverflow
Solution 4 - Tensorflowsaijun HuView Answer on Stackoverflow