Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class) target (torch.Tensor): The target of each prediction, shape (N, ) topk (int | tuple[int], optional): If the predictions in ``topk``
(pred, target, topk=1, thresh=None)
source not stored for this graph (policy: none)
no outgoing calls