How to use the nnunet.training.loss_functions.dice_loss.GDiceLossV2 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 / network_training / nnUNetTrainer_GDice.py View on Github external
def __init__(self, plans_file, fold, output_folder=None, dataset_directory=None, batch_dice=True, stage=None,
                 unpack_data=True, deterministic=True, fp16=False):
        super().__init__(plans_file, fold, output_folder, dataset_directory, batch_dice, stage,
                                              unpack_data, deterministic, fp16)
        self.apply_nonlin = softmax_helper
        self.loss = GDiceLossV2(apply_nonlin=self.apply_nonlin, smooth=1e-5)