def calc_accuracy(pred, real):
    """
    A function to calculate the accuracy of a CNN when given a list of predicted classes and a list of the real classes
    
    Param:
          - pred, a numpy array of predicted classes
          - real, a numpy array of the real classes
    Return:
          - Accuracy as a decimal
    """
    
    return sum(pred==real) / len(pred)