code: def value(self):
          
  
          if self.scores.numel() == 0:
              return 0
          ap = torch.zeros(self.scores.size(1))
          rg = torch.arange(1, self.scores.size(0)).float()
  
          # compute average precision for each class
          for k in range(self.scores.size(1)):
              # sort scores
              scores = self.scores[:, k]
              targets = self.targets[:, k]
  
              # compute average precision
              ap[k] = AveragePrecisionMeter.average_precision(scores, targets, self.difficult_examples)
          return ap
docs: Returns the model's average precision for each class
          Return:
              ap (FloatTensor): 1xK tensor, with avg precision for each class k