-
Notifications
You must be signed in to change notification settings - Fork 0
Metrics Documentation
The basic metric class
-
extends:
torch.nn.Module
-
Could be use as a decorator of a function
-
Metric tensor is released from memory as soon as the result returned
-
[Deprecation Warning]: Method
call
is deprecated from v1.0.0 and will be removed from v1.1.0, override theforward
method instead."
- Properties:
- result: The
torch.Tensor
of average metric results
- result: The
-
Constructor
- Parameters:
- metric_fn: An optional
Callable
metrics function that acceptsAny
kind of prediction input and target and returns a metrictorch.Tensor
. Acall
method must be overriden if this parameter is set asNone
. - target: A
str
of target name ininput
andtarget
during direct calling
- metric_fn: An optional
- Parameters:
-
forward
- Forward the current result method
- Parameters:
- input: The prediction, or
y_pred
, inAny
kind - target: The label, or
y_true
, inAny
kind
- input: The prediction, or
- Returns: The metric in
torch.Tensor
-
reset
- Reset the current results list
The traditional accuracy metric to compare two torch.Tensor
- extends:
Metric
The accuracy metric for normal integer labels
-
extends:
Accuracy
-
Properties: - dim: An
int
of the probability dim index for the input -
Constructor
- Parameters: - dim: An `int` of the classification dimension - target: A `str` of target name in `input` and `target` during direct calling
The accuracy metric for categorical labels
- extends:
SparseCategoricalAccuracy
The Mean Absolute Error metric
- extends:
Metric
The metric that calculates confusion metrics
-
extends:
Metric
-
Constructor - Parameters: - num_classes: An
int
of the total number of classes - target: Astr
of target name ininput
andtarget
during direct calling
The iIoU metric for segmentation
- extends:
ConfusionMetrics
The mIoU metric for segmentation
-
extends:
Metric
-
The old
MIoU
metric in v1.0.3 calculates iIoU and has been renamed toInstanceIoU
-
Constructor - Parameters: - dim: An
int
of class dimension - smooth: Afloat
of smooth value to avoid zero devision