def accuracy(outputs, labels):
    '\n    Compute the accuracy, given the outputs and labels for all images.\n\n    Args:\n        outputs: (np.ndarray) output of the model\n        labels: (np.ndarray) [0, 1, ..., num_classes-1]\n\n    Returns: (float) accuracy in [0,1]\n    '
    outputs = np.argmax(outputs, axis=1)
    return (np.sum((outputs == labels)) / float(labels.size))
Compute the accuracy, given the outputs and labels for all images.

Args:
    outputs: (np.ndarray) output of the model
    labels: (np.ndarray) [0, 1, ..., num_classes-1]

Returns: (float) accuracy in [0,1]
def accuracy(outputs, labels):
    '\n    Compute the accuracy, given the outputs and labels for all images.\n\n    Args:\n        outputs: (np.ndarray) output of the model\n        labels: (np.ndarray) [0, 1, ..., num_classes-1]\n\n    Returns: (float) accuracy in [0,1]\n    '
    outputs = np.argmax(outputs, axis=1)
    return (np.sum((outputs == labels)) / float(labels.size))