Custom loss functions
CustomLoss
def CustomLoss(
loss_func
):
A custom loss wrapper class for loss functions to allow them to work with the ‘show_results’ method in fastai.
TverskyFocalLoss
def TverskyFocalLoss(
include_background:bool=True, to_onehot_y:bool=False, sigmoid:bool=False, softmax:bool=False, gamma:float=2,
alpha:float=0.5, beta:float=0.99
):
Compute Tversky loss with a focus parameter, gamma, applied. The details of Tversky loss is shown in monai.losses.TverskyLoss.