example for stacked autoencoder and Pattern genarator