LibMTL.metrics
¶
- class AbsMetric[source]¶
Bases:
object
An abstract class for the performance metrics of a task.
- record¶
A list of the metric scores in every iteration.
- Type
list
- bs¶
A list of the number of data in every iteration.
- Type
list
- property update_fun(self, pred, gt)[source]¶
Calculate the metric scores in every iteration and update
record
.- Parameters
pred (torch.Tensor) – The prediction tensor.
gt (torch.Tensor) – The ground-truth tensor.