Tweaked example to use autoencoder for feature extraction