Dataset

We are planning to use the MNIST dataset in the idx3 format as input to train our autoencoders. We will be testing the autoencoder on the first 100 images. Let's first plot the original images:

from tensorflow.examples.tutorials.mnist import input_dataimport matplotlib.pyplot as pltmnist = input_data.read_data_sets('MNIST_data', one_hot = True)class OriginalImages:    def __init__(self):        pass    def main(self):        X_train, X_test = self.standard_scale(mnist.train.images, mnist.test.images)        original_imgs = X_test[:100]        plt.figure(1, figsize=(10, 10))        for i in range(0, 100):            im = original_imgs[i].reshape((28, 28))            ax = plt.subplot(10, 10, i + 1)            for label in (ax.get_xticklabels() + ax.get_yticklabels()):                label.set_fontsize(8) plt.imshow(im, ...

Get Neural Network Programming with TensorFlow 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.