Start the TensorFlow session and initialize the variables:
session = tf.InteractiveSession()
tf.global_variables_initializer().run()
Define the batch_size:
batch_size = 128
Define the number of epochs and the number of classes:
num_epochs = 500
num_classes = 10
Define the images and labels:
images = (data.train.images)
labels = data.train.labels