train.py
def evaluate_model_on_data(self, sess, dataset_label):
        """Evaluate the model on the entire training data.

        Args:
            sess (tf.Session object): active session object
            dataset_label (string): dataset label

        Returns:
            float, float: the cost and accuracy of the model based on the dataset.
        """
        try:
            dataset_dict = {'test': self.test_data,
                            'train': self.test_data,
                            'val': self.val_data}
            dataset = dataset_dict[dataset_label]
        except KeyError:
            raise '"dataset" arg must be in dataset dict: {}'.format(dataset_dict.keys())

        cost, acc, summary = sess.run([self.model.cost, self.model.accuracy, self.summary_op],
                                      feed_dict={self.model.x: dataset[0],
                                                 self.model.y: dataset[1],
                                                 self.model.trainable: False})

        return cost, acc, summary
Evaluate the model on the entire training data.

        Args:
            sess (tf.Session object): active session object
            dataset_label (string): dataset label

        Returns:
            float, float: the cost and accuracy of the model based on the dataset.
        
Evaluate the model on the entire training data.
Evaluate the model on the entire training data .
def evaluate_model_on_data(self, sess, dataset_label):
        try:
            dataset_dict = {'test': self.test_data,
                            'train': self.test_data,
                            'val': self.val_data}
            dataset = dataset_dict[dataset_label]
        except KeyError:
            raise '"dataset" arg must be in dataset dict: {}'.format(dataset_dict.keys())
        cost, acc, summary = sess.run([self.model.cost, self.model.accuracy, self.summary_op],
                                      feed_dict={self.model.x: dataset[0],
                                                 self.model.y: dataset[1],
                                                 self.model.trainable: False})
        return cost, acc, summary
def evaluate_model_on_data ( self , sess , dataset_label ) : try : dataset_dict = { 'test' : self . test_data , 'train' : self . test_data , 'val' : self . val_data } dataset = dataset_dict [ dataset_label ] except KeyError : raise '"dataset" arg must be in dataset dict: {}' . format ( dataset_dict . keys ( ) ) cost , acc , summary = sess . run ( [ self . model . cost , self . model . accuracy , self . summary_op ] , feed_dict = { self . model . x : dataset [ 0 ] , self . model . y : dataset [ 1 ] , self . model . trainable : False } ) return cost , acc , summary
Evaluate the model on the entire training data.
Evaluate the model on the entire training data .
"""Evaluate the model on the entire training data.

        Args:
            sess (tf.Session object): active session object
            dataset_label (string): dataset label

        Returns:
            float, float: the cost and accuracy of the model based on the dataset.
        """
float, float: the cost and accuracy of the model based on the dataset.
float float : the cost and accuracy of the model based on the dataset .
self
sess
active session object
active session object
dataset_label
None