December 2018
Beginner to intermediate
684 pages
21h 9m
English
Training stops after some 20 epochs with a test RMSE of 0.1122:
mse = autoencoder.evaluate(x=X_test_scaled, y=X_test_scaled)mse, mse **.5(0.012588984733819962, 0.11220064497951855)
To encode data, we use the encoder we just defined, like so:
encoded_test_img = encoder.predict(X_test_scaled)Encoded_test_img.shape(10000, 32)
The decoder takes the compressed data and reproduces the output according to the autoencoder training results:
decoded_test_img = decoder.predict(encoded_test_img)decoded_test_img.shape(10000, 784)
The following figure shows ten original images and their reconstruction by the autoencoder and illustrates the loss after compression: