vision.pytorch.losses package#

Submodules#

vision.pytorch.losses.dice_loss module#

class vision.pytorch.losses.dice_loss.Dice#

Bases: object

__init__(num_classes: int, to_onehot_y: bool = True, to_onehot_x: bool = False, use_softmax: bool = True, use_argmax: bool = False, include_background: bool = False, input_shape=None)#
class vision.pytorch.losses.dice_loss.DiceCELoss#

Bases: torch.nn.Module

__init__(num_classes, input_shape, include_background, wc=0.5, wd=0.5)#
forward(outputs, labels)#
class vision.pytorch.losses.dice_loss.DiceScore#

Bases: object

__init__(to_onehot_y: bool = True, to_onehot_x: bool = True, use_argmax: bool = False, use_softmax: bool = False, include_background: bool = False)#
vision.pytorch.losses.dice_loss.to_one_hot(array, channel_axis, num_classes)#

Module contents#