def _run_validation_error_and_summaries(self, epoch, validation_set, validation_labels):

        """ Run the summaries and error computation on the validation set.
        :param epoch: current epoch number
        :param validation_set: validation set
        :param validation_labels: validation labels
        :return: self
        """

        feed = self._create_feed(validation_set, validation_labels, 1)
        result = self.tf_session.run([self.tf_merged_summaries, self.cost], feed_dict=feed)
        summary_str = result[0]
        err = result[1]

        self.tf_summary_writer.add_summary(summary_str, epoch)

        if self.verbose == 1:
            print("Cost at step %s: %s" % (epoch, err))
dataset/ETHPy150Open blackecho/Deep-Learning-TensorFlow/models/rbm_models/dbn.py/DBN._run_validation_error_and_summaries/original