import torch


def cross_entropy_accuracy(preds, targets):
    """Accuracy for regular CrossEntropyLoss"""
    _, preds = torch.max(preds, dim=1)
    acc = 100*(preds == targets).float().mean()
    return acc