torchtraining.functional.loss module¶
-
torchtraining.functional.loss.binary_focal_loss(outputs: torch.Tensor, targets: torch.Tensor, gamma: float, weight=None, pos_weight=None, reduction: Callable[torch.Tensor, torch.Tensor] = None) → torch.Tensor[source]¶ See
torchtrainingnal.loss.BinaryFocalLossfor details.
-
torchtraining.functional.loss.multiclass_focal_loss(outputs: torch.Tensor, targets: torch.Tensor, gamma: float, weight=None, ignore_index=- 100, reduction: Callable[torch.Tensor, torch.Tensor] = None) → torch.Tensor[source]¶ See
torchtrainingnal.loss.MulticlassFocalLossfor details.
-
torchtraining.functional.loss.quadruplet(anchor: torch.Tensor, positive: torch.Tensor, negative: torch.Tensor, negative2: torch.Tensor, alpha1: float = 1.0, alpha2: float = 0.5, metric: Callable[[torch.Tensor, torch.Tensor], torch.Tensor] = <function pairwise_distance>, weight=None, reduction: Callable[torch.Tensor, torch.Tensor] = None) → torch.Tensor[source]¶ See
torchtrainingnal.loss.Quadrupletfor details.
-
torchtraining.functional.loss.smooth_binary_cross_entropy(outputs: torch.Tensor, targets: torch.Tensor, alpha: float, weight=None, pos_weight=None, reduction: Callable[torch.Tensor, torch.Tensor] = None) → torch.Tensor[source]¶ See
torchtrainingnal.loss.SmoothBinaryCrossEntropyfor details.
-
torchtraining.functional.loss.smooth_cross_entropy(outputs: torch.Tensor, targets: torch.Tensor, alpha: float, weight=None, ignore_index: int = - 100, reduction: Callable[torch.Tensor, torch.Tensor] = None) → torch.Tensor[source]¶ See
torchtrainingnal.loss.SmoothCrossEntropyfor details.