trax/tf_numpy/examples/mnist/model.py
def evaluate(self, x, y):
        """Returns the number of correct predictions.

        Args:
            x: 2-d array of size batch_size x image_size.
            y: 2-d array of size batch_size x num_classes.

        Returns:
            A scalar, the number of correct predictions.
        """
        y_actual = np.argmax(y,  axis=1)
        y_predicted = np.argmax(self.forward(x), axis=1)
        correct = int(np.sum(np.array(y_actual == y_predicted)))
        return correct
Returns the number of correct predictions.

        Args:
            x: 2-d array of size batch_size x image_size.
            y: 2-d array of size batch_size x num_classes.

        Returns:
            A scalar, the number of correct predictions.
        
Returns the number of correct predictions.
Returns the number of correct predictions .
def evaluate(self, x, y):
        y_actual = np.argmax(y,  axis=1)
        y_predicted = np.argmax(self.forward(x), axis=1)
        correct = int(np.sum(np.array(y_actual == y_predicted)))
        return correct
def evaluate ( self , x , y ) : y_actual = np . argmax ( y , axis = 1 ) y_predicted = np . argmax ( self . forward ( x ) , axis = 1 ) correct = int ( np . sum ( np . array ( y_actual == y_predicted ) ) ) return correct
Returns the number of correct predictions.
Returns the number of correct predictions .
"""Returns the number of correct predictions.

        Args:
            x: 2-d array of size batch_size x image_size.
            y: 2-d array of size batch_size x num_classes.

        Returns:
            A scalar, the number of correct predictions.
        """
A scalar, the number of correct predictions.
A scalar the number of correct predictions .
self
x
2-d array of size batch_size x image_size.
2 - d array of size batch_size x image_size .
y
2-d array of size batch_size x num_classes.
2 - d array of size batch_size x num_classes .