Visualizing Graphs in TensorBoard
Monitoring and troubleshooting machine learning algorithms can be a daunting task, especially if you have to wait a long time for the training to complete before you know the results. To work around this, TensorFlow includes a computational graph visualization tool called TensorBoard. With TensorBoard, we can visualize graphs and important values (loss, accuracy, batch training time, and so on) even during training.
Getting ready
To illustrate the various ways we can use TensorBoard, we will reimplement the MNIST model from The Introductory CNN Model recipe in Chapter 8, Convolutional Neural Networks. Then, we'll add the TensorBoard callback and fit the model. We will show how to monitor numerical values, histograms of sets of values, how to create an image in TensorBoard, and how to visualize TensorFlow models.
How to do it...
- First, we'll load the libraries necessary for the script: ...