How to use the nnunet.training.loss_functions.ND_Crossentropy.WeightedCrossEntropyLoss function in nnunet

To help you get started, we’ve selected a few nnunet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JunMa11 / SegLoss / loss_functions / dice_loss.py View on Github external
def __init__(self, soft_dice_kwargs, wce_kwargs, gamma=0.3):
        super(ExpLog_loss, self).__init__()
        self.wce = WeightedCrossEntropyLoss(**wce_kwargs)
        self.dc = SoftDiceLoss(apply_nonlin=softmax_helper, **soft_dice_kwargs)
        self.gamma = gamma