code to train Deep Auto Encoders in R