Fixed problem with autoencoder on_the_fly parameter