Metrics #
TorchLean metrics helpers.
These are non-differentiable evaluation helpers for classification and accuracy reports.
Instances For
Index of the first maximum in row-major storage order.
This operation accepts a tensor of any rank. It returns none exactly when the tensor has no
entries; ties are resolved in favor of the first index.
Instances For
Indices of the maxima along axis, in row-major order over all remaining dimensions.
The selected axis is moved to the innermost position before the tensor is flattened, so each
contiguous chunk is one class slice. An empty class axis contributes none for every slice of the
remaining shape. Ties are resolved in favor of the first index.
Instances For
Compare logits with one-hot targets along axis, once for every slice orthogonal to that axis.
An entry is none exactly when the selected class axis is empty. Otherwise it records whether the
two first-maximum indices agree.
Instances For
Count correct and total one-hot classifications along axis.