class_docstr: Accuracy calculation module.
class_docstr_tok: ["Accuracy","calculation","module","."]
docstr: Forward function to calculate accuracy.
  
  Args:
      pred (torch.Tensor): Prediction of models.
      target (torch.Tensor): Target for each prediction.
  
  Returns:
      tuple[float]: The accuracies under different topk criterions.
docstr_tok: ["Forward","function","to","calculate","accuracy",".","Args",":","pred","(","torch.Tensor",")",":","Prediction","of","models",".","target","(","torch.Tensor",")",":","Target","for","each","prediction",".","Returns",":","tuple","[","float","]",":","The","accuracies","under","different","topk","criterions","."]
code: def forward(self, pred, target):
      """Forward function to calculate accuracy.
  
      Args:
          pred (torch.Tensor): Prediction of models.
          target (torch.Tensor): Target for each prediction.
  
      Returns:
          tuple[float]: The accuracies under different topk criterions.
      """
      return accuracy(pred, target, self.topk, self.thresh)
  
imports: import torch.nn
label_desc: Use image node_id 2 for calling the Accuracy obj's underlying member method code with example usage: obj.forward(pred, target) and returns: accuracy