BaseScoreClassif#

class scio.scores.BaseScoreClassif(*, act_norm=None, mode='raw')[source]#

Bases: BaseScore[Tensor, Tensor]

Base class for classification scores.

In classification, the output of the network is expected to be in the logit space.

Parameters:

Useful methods defined here

get_conformity(inputs)

Compute output and associated conformity at inference.

abstractmethod get_conformity(inputs)[source]#

Compute output and associated conformity at inference.

Returns:

  • out (Tensor) – The result of inputs forward pass through the network.

  • conformity (Tensor) – The conformity associated with out, both sample-wise and class-wise. The shape must be one of (n_samples, n_classes), (n_samples, 1) or (n_samples,). In the last two cases, the same score will be attributed to every class by reshaping and broadcasting.