code: def pretrain(self, train_set, validation_set=None):
          
          self.do_pretrain = True
  
          def set_params_func(autoenc, autoencgraph):
              params = autoenc.get_parameters(graph=autoencgraph)
              self.encoding_w_.append(params['enc_w'])
              self.encoding_b_.append(params['enc_b'])
  
          return SupervisedModel.pretrain_procedure(
              self, self.autoencoders, self.autoencoder_graphs,
              set_params_func=set_params_func, train_set=train_set,
              validation_set=validation_set)
docs: Perform Unsupervised pretraining of the autoencoder.