import torch


def evaluate_acc(confidences: torch.Tensor,
                 true_labels: torch.Tensor) -> float:
    """
    Args:
        confidences (Tensor): a tensor of shape [N, K] of predicted confidences.
        true_labels (Tensor): a tensor of shape [N,] of ground truth labels.

    Returns:
        acc (float): average accuracy of predictions.
    """
    acc = torch.max(
        confidences, dim=1
    )[1].eq(true_labels).float().mean().item()

    return acc