inferno.extensions.criteria package

Submodules

inferno.extensions.criteria.core module

class inferno.extensions.criteria.core.Criteria(*criteria)[source]

Bases: torch.nn.modules.module.Module

Aggregate multiple criteria to one.

forward(prediction, target)[source]
class inferno.extensions.criteria.core.As2DCriterion(criterion)[source]

Bases: torch.nn.modules.module.Module

Makes a given criterion applicable on (N, C, H, W) prediction and (N, H, W) target tensors, if they’re applicable to (N, C) prediction and (N,) target tensors .

forward(prediction, target)[source]

inferno.extensions.criteria.set_similarity_measures module

class inferno.extensions.criteria.set_similarity_measures.SorensenDiceLoss(weight=None, channelwise=True, eps=1e-06)[source]

Bases: torch.nn.modules.module.Module

Computes a loss scalar, which when minimized maximizes the Sorensen-Dice similarity between the input and the target. For both inputs and targets it must be the case that input_or_target.size(1) = num_channels.

forward(input, target)[source]

Module contents