Ways to debug the code

In order to understand how TensorBoard helps, let's initialize a model structure as follows, one that is bound not to work:

Note that, in this code snippet, the validation accuracy is only around 19%.

The reason for such a low validation accuracy is that the input dataset is not scaled and we are performing ReLU activation on top of an unscaled dataset.

Note that, in the preceding code, we are storing the logs of the model run in the directory logs/tensor_new6 (the sub-directory could be named anything).

Once the logs are stored in this location, we start TensorBoard as follows:

The preceding code starts TensorBoard, ...

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.