vision.pytorch.losses package#

Submodules#

vision.pytorch.losses.dice_loss module#

class vision.pytorch.losses.dice_loss.Dice[source]#

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, use_native_onehot: bool = True)[source]#
class vision.pytorch.losses.dice_loss.DiceCELoss[source]#

Bases: torch.nn.Module

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

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)[source]#
vision.pytorch.losses.dice_loss.to_one_hot(array, channel_axis, num_classes, use_native_onehot)[source]#

Module contents#