MIC-DKFZ / MedNeXt

[MICCAI 2023] MedNeXt is a fully ConvNeXt architecture for 3D medical image segmentation.
https://arxiv.org/pdf/2303.09975
Apache License 2.0
345 stars 26 forks source link

Setting number of epochs #28

Open toufiqmusah opened 3 months ago

toufiqmusah commented 3 months ago

Hello there..

How do I set the number of desired epochs when training with mednext as follows:

!mednextv1_train 3d_fullres nnUNetTrainerV2_MedNeXt_M_kernel3 2023 3 -p nnUNetPlansv2.1_trgSp_1x1x1

Thank you

saikat-roy commented 3 months ago

Hi @toufiqmusah. You would have to create a new Trainer class by inheriting from nnUNetTrainerv2 and insert it into the constructor of the new Trainer class. Since I did this on nnUNet v1, there's no easier or more straightforward way to do this. This info should be available on the old nnUNet v1 branch of the nnUNet repository. Please let me know if you can't find it.

toufiqmusah commented 3 months ago

I have been able to sort it out. Thank you very much

Hi @toufiqmusah. You would have to create a new Trainer class by inheriting from nnUNetTrainerv2 and insert it into the constructor of the new Trainer class. Since I did this on nnUNet v1, there's no easier or more straightforward way to do this. This info should be available on the old nnUNet v1 branch of the nnUNet repository. Please let me know if you can't find it.