Esempio n. 1
0
 def _metric(self, preds: Tensor, target: Tensor) -> Tensor:
     valid_indexes = (target != self.exclude)
     return retrieval_average_precision(preds[valid_indexes],
                                        target[valid_indexes])
Esempio n. 2
0
 def _metric(self, preds: Tensor, target: Tensor) -> Tensor:
     return retrieval_average_precision(preds, target)