def compute_acc(pred, labels):
    """
    Compute the accuracy of prediction given the labels.
    """
    labels = labels.long()
    return (th.argmax(pred, dim=1) == labels).float().sum() / len(pred)

    Compute the accuracy of prediction given the labels.
    
benchmarks/benchmarks/model_acc/bench_sage_ns.py