sdae implementation with pretraining of supervised layer