Greatly modified example for autoencoders, adding feedforward output once network weights have been stabilized