docstr: Module to calculate the accuracy.
  
  Args:
      topk (tuple, optional): The criterion used to calculate the
          accuracy. Defaults to (1,).
      thresh (float, optional): If not None, predictions with scores
          under this threshold are considered incorrect. Default to None.
docstr_tok: ["Module","to","calculate","the","accuracy",".","Args",":","topk","(","tuple",",","optional",")",":","The","criterion","used","to","calculate","the","accuracy",".","Defaults","to","(","1",",",")",".","thresh","(","float",",","optional",")",":","If","not","None",",","predictions","with","scores","under","this","threshold","are","considered","incorrect",".","Default","to","None","."]
code: def __init__(self, topk=(1,), thresh=None):
      """Module to calculate the accuracy.
  
      Args:
          topk (tuple, optional): The criterion used to calculate the
              accuracy. Defaults to (1,).
          thresh (float, optional): If not None, predictions with scores
              under this threshold are considered incorrect. Default to None.
      """
      super().__init__()
      self.topk = topk
      self.thresh = thresh
  
imports: import torch.nn
label_desc: Use image node_id 1 to create a new Accuracy object from inherited base classes: nn with example: obj = Accuracy(topk, thresh)