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 and graph's 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 linear regression model from The TensorFlow way of linear regression recipe in Chapter 3, Linear Regression. We'll generate linear data with errors, and use TensorFlow loss and back-propagation to fit a line to the data. We will show how to monitor numerical values, histograms of sets of values, and how to create an image in TensorBoard.
How to do it...
- First, we'll load the libraries necessary for the script:
import os import io import time import numpy...