Path: blob/master/site/en-snapshot/tensorboard/text_summaries.ipynb
25115 views
Copyright 2021 The TensorFlow Authors.
Displaying text data in TensorBoard
Overview
Using the TensorFlow Text Summary API, you can easily log arbitrary text and view it in TensorBoard. This can be extremely helpful to sample and examine your input data, or to record execution metadata or generated text. You can also log diagnostic data as text that can be helpful in the course of your model development.
In this tutorial, you will try out some basic use cases of the Text Summary API.
Setup
Logging a single piece of text
To understand how the Text Summary API works, you're going to simply log a bit of text and see how it is presented in TensorBoard.
Now, use TensorBoard to examine the text. Wait a few seconds for the UI to spin up.
Organizing multiple text streams
If you have multiple streams of text, you can keep them in separate namespaces to help organize them, just like scalars or other data.
Note that if you log text at many steps, TensorBoard will subsample the steps to display so as to make the presentation manageable. You can control the sampling rate using the --samples_per_plugin
flag.
Markdown interpretation
TensorBoard interprets text summaries as Markdown, since rich formatting can make the data you log easier to read and understand, as shown below. (If you don't want Markdown interpretation, see this issue for workarounds to suppress interpretation.)