def _train_model(self, train_set, train_labels, validation_set, validation_labels, mode='supervised'):

        shuff = zip(train_set, train_labels)

        for i in range(self.finetune_num_epochs):

            np.random.shuffle(shuff)
            batches = [_ for _ in utilities.gen_batches(shuff, self.finetune_batch_size)]

            for batch in batches:
                x_batch, y_batch = zip(*batch)
                self.tf_session.run(self.train_step, feed_dict={self.input_data: x_batch,
                                                                self.input_labels: y_batch,
                                                                self.keep_prob: self.dropout})

            if validation_set is not None:
                self._run_validation_error_and_summaries(i, validation_set, validation_labels, mode)
Train the model.
dataset/ETHPy150Open blackecho/Deep-Learning-TensorFlow/models/autoencoder_models/stacked_denoising_autoencoder.py/StackedDenoisingAutoencoder._train_model