LibMTL.metrics¶
- class AbsMetric[source]¶
Bases:
objectAn 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[source]¶
- Calculate the metric scores in every iteration and update :attr:`record`.
- Parameters:
pred (torch.Tensor) – The prediction tensor.
gt (torch.Tensor) – The ground-truth tensor.