MIC-DKFZ / nnUNet

Apache License 2.0
5.9k stars 1.76k forks source link

What is the command to run after creating a custom nnUNetTrainer class with 100 epochs? #2247

Closed ccordobag closed 5 months ago

ccordobag commented 5 months ago

Hello, I know there are a lot of closed issues regarding the number of epochs. However, I do not find anywhere which is the command that needs to be used on the Command Prompt after you have created the new class for 100 epochs or what are the steps that need to be followed. Could you help me, please?

I used this:

import torch from nnunetv2.training.nnUNetTrainer.nnUNetTrainer import nnUNetTrainer

class nnUNetTrainer_100epochs(nnUNetTrainer): def init(self, plans: dict, configuration: str, fold: int, dataset_json: dict, unpack_dataset: bool = True, device: torch.device = torch.device('cuda')): """used for debugging plans etc""" super().init(plans, configuration, fold, dataset_json, unpack_dataset, device) self.num_epochs = 100

From: https://github.com/MIC-DKFZ/nnUNet/blob/master/nnunetv2/training/nnUNetTrainer/variants/training_length/nnUNetTrainer_Xepochs.py

ccordobag commented 5 months ago

OK i found it, thanks. If someone needs this: nnUNetv2_train DATSET_ID 2d 0 -tr nnUNetTrainer_100epochs