(self, x, y)
return int(
        np.sum(np.array(y_actual == y_predicted, copy=False, dtype=int32)))
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):
    """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)
    return int(
        np.sum(np.array(y_actual == y_predicted, copy=False, dtype=int32)))
def evaluate ( self , x , y ) : y_actual = np . argmax ( y , axis = 1 ) y_predicted = np . argmax ( self . forward ( x ) , axis = 1 ) return int ( np . sum ( np . array ( y_actual == y_predicted , copy = False , dtype = int32 ) ) )