Basic autoencoder recreated images plot

Having recreated the images, let's plot them to get a feel of how they look. First, we will reconstruct the images using the autoencoder instance created earlier:

predicted_imgs = autoencoder.reconstruct(X_test[:100])plt.figure(1, figsize=(10, 10))for i in range(0, 100):    im = predicted_imgs[i].reshape((28, 28))    ax = plt.subplot(10, 10, i + 1)    for label in (ax.get_xticklabels() + ax.get_yticklabels()):                label.set_fontname('Arial')                label.set_fontsize(8)    plt.imshow(im, cmap="gray", clim=(0.0, 1.0))plt.suptitle('Basic AutoEncoder Images', fontsize=15, y=0.95)plt.savefig('figures/basic_autoencoder_images.png')plt.show()

Let's look at the created images from the neural network:

Basic autoencoder plot of output ...

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.