Basic autoencoders with MNIST data

Let's use the autoencoder with MNIST data: mnist = input_data.read_data_sets('MNIST_data', one_hot = True).

Use StandardScalar from Scikit Learn's sklearn.preprocessing module to extract testmnist.test.images and training images mnist.train.images:

X_train, X_test = self.standard_scale(mnist.train.images, mnist.test.images).
The preprocessing module provides a utility class, StandardScaler, which implements the Transformer API. This computes and transforms the mean and standard deviation of a training set. It reapplies the same transformation to the testing set. By default, Scalar centers the mean and makes the variance one. It is possible to disable either centering or scaling by passing with_mean=False ...

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.