In the previous chapter, we demonstrated how to set up TensorBoard with Keras. However, as already mentioned, TensorBoard can also be used with TensorFlow (among others). In this recipe, we will show you how to use TensorBoard with TensorFlow when classifying Fashion-MNIST.
Visualizing training with TensorBoard
How to do it..
- Let's start by importing TensorFlow and a tool to load mnist datasets, as follows:
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
- Next, we specify the Fashion MNIST dataset and load it:
mnist = input_data.read_data_sets('Data/fashion', one_hot=True)
- Let's create the placeholders for the input data:
n_classes = 10
input_size = 784
x = tf.placeholder...