Setting up TensorBoard from TensorFlow

In the previous chapter, we have seen that there are two ways to define a model in TensorFlow:

  • Premade estimators
  • Building a custom estimator

In the following code, we will consider one additional snippet of code that would enable us to visualize the various summary operations:

Note that we only need to specify the model_dir in the premade estimator to store the various log files generated from TensorFlow operations.

TensorBoard can then be initialized by referring to the model directory, as follows:

The preceding code would result in a TensorBoard visualization that would have all the summaries built ...

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.