MedNeXt icon indicating copy to clipboard operation
MedNeXt copied to clipboard

Setting number of epochs

Open toufiqmusah opened this issue 1 year ago • 2 comments

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

toufiqmusah avatar Jul 29 '24 02:07 toufiqmusah

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.

saikat-roy avatar Jul 30 '24 01:07 saikat-roy

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.

toufiqmusah avatar Aug 04 '24 17:08 toufiqmusah