(self, data)
return {ACCURACY_KEY: acc, 'loss': loss}
Tests the current model on the given data.

        Args:
            data: dict of the form {'x': [list], 'y': [list]}
        Return:
            dict of metrics that will be recorded by the simulation.
Tests the current model on the given data.
Tests the current model on the given data .
def test(self, data):
        """
        Tests the current model on the given data.

        Args:
            data: dict of the form {'x': [list], 'y': [list]}
        Return:
            dict of metrics that will be recorded by the simulation.
        """
        x_vecs = self.process_x(data['x'])
        labels = self.process_y(data['y'])
        with self.graph.as_default():
            tot_acc, loss = self.sess.run(
                [self.eval_metric_ops, self.loss],
                feed_dict={self.features: x_vecs, self.labels: labels}
            )
        acc = float(tot_acc) / x_vecs.shape[0]
        return {ACCURACY_KEY: acc, 'loss': loss}
def test ( self , data ) : x_vecs = self . process_x ( data [ 'x' ] ) labels = self . process_y ( data [ 'y' ] ) with self . graph . as_default ( ) : tot_acc , loss = self . sess . run ( [ self . eval_metric_ops , self . loss ] , feed_dict = { self . features : x_vecs , self . labels : labels } ) acc = float ( tot_acc ) / x_vecs . shape [ 0 ] return { ACCURACY_KEY : acc , 'loss' : loss }