Retrainable autoencoder