completed the createPreTrainingLayer() method in DBN