Basics of Using TensorBoard in TensorFlow 1 & 2

Stop using Matplotlib to plot your losses — visualize graphs & models, filters, losses…

Sebastian Theiler
Analytics Vidhya

--

Edited from a photo by Pankaj Patel on Unsplash

TensorBoard is a powerful visualization tool built straight into TensorFlow that allows you to find insights in your ML model.

TensorBoard can visualize anything from scalars (e.g., loss/accuracy), to images, histograms, to the TensorFlow graph, to much more.

Plotting accuracy
LEFT: Graph visualization | RIGHT: Conv. filter visualizations

Contents

  1. How TensorBoard Works
  2. Visualizing the TF Graph (and Keras Models)
  3. Types of Summaries
  4. Use in model.fit
  5. Conclusion

Note: this tutorial is primarily built for TensorFlow 1.x, and most code samples will be written assuming you have TF 1.x installed. Despite this, in the subtitle section of each code sample, there will be a link to the TensorFlow 2.x version that will produce identical results, unless the code is

--

--

Sebastian Theiler
Analytics Vidhya

This account is inactive now; thank you to everyone who has read my pieces! I’m so glad I could share some knowledge about AI and data science. I might return…