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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.