def _run_validation_error_and_summaries(self, epoch, validation_set, validation_labels, mode='supervised'):

        feed = {self.input_data: validation_set, self.input_labels: validation_labels, self.keep_prob: 1}

        result = None
        printstr = None
        if mode == 'supervised':
            result = self.tf_session.run([self.tf_merged_summaries, self.accuracy], feed_dict=feed)
            printstr = 'Accuracy at step '

        elif mode == 'reconstruction':
            result = self.tf_session.run([self.tf_merged_summaries, self.cost], feed_dict=feed)
            printstr = 'Reconstruction loss at step '

        summary_str = result[0]
        acc = result[1]

        self.tf_summary_writer.add_summary(summary_str, epoch)

        if self.verbose == 1:
            print(printstr + "%s: %s" % (epoch, acc))
Run the summaries and error computation on the validation set.
dataset/ETHPy150Open blackecho/Deep-Learning-TensorFlow/models/autoencoder_models/stacked_denoising_autoencoder.py/StackedDenoisingAutoencoder._run_validation_error_and_summaries