    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)
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.
third_parts/mmdet/models/losses/accuracy.py