Using TensorBoard to visualize deep learning networks

Computation graphs in TensorFlow can be very complex, so there is a visualization tool called TensorBoard to visualize these graphs and assist in debugging. TensorBoard can plot a computation graph, display metrics from training, and so on. Since Keras uses TensorFlow in the backend, it too can use TensorBoard. Here is the MNIST example from Keras with TensorBoard logging enabled. This code can be found in the Chapter8/mnist_keras.R folder. The first part of the code loads the data, pre-processes it, and defines the model architecture. Hopefully, this should be familiar to you at this stage:

library(keras)mnist_data <- dataset_mnist()xtrain <- array_reshape(mnist_data$train$x,c(nrow(mnist_data$train$x),28,28,1)) ...

Get R Deep Learning Essentials 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.