Summaries from custom estimator

In the previous section, we looked at obtaining predefined summaries from premade estimators in TensorBoard. In this section, we will understand obtaining summaries in custom estimators so that they can be visualized in TensorBoard.

The summary operations that need to be captured should be specified in the custom estimator function, as follows:

Note that the model function remains very similar to what we defined in the previous section while learning about custom estimators; however, a few lines of code that write summary to log files are added.

tf.summary.scalar adds the accuracy metric. Similarly, we might ...

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.