nnUNet icon indicating copy to clipboard operation
nnUNet copied to clipboard

How to set epoch number

Open Wenhui-Zhang-5 opened this issue 2 years ago • 1 comments

Hi,

Many thanks for your code and it is really helpful. I am quite new to this area and wondering how I can control the number of epochs since it runs too long on my datasets. Thanks in advance!

Best wishes

Wenhui-Zhang-5 avatar May 12 '22 10:05 Wenhui-Zhang-5

Just create a custom trainer and change the number of epochs as you see in the V2 trainer.

A quick search and I found this for you: https://github.com/MIC-DKFZ/nnUNet/blob/6d02b5a4e2a7eae14361cde9599bbf4ccde2cd37/nnunet/training/network_training/nnUNet_variants/benchmarking/nnUNetTrainerV2_2epochs.py#L27

This has also been discussed in the issues multiple times and answered. Use the search function. You should in general not alter this value since the network has a decaying LR scheduler and the network will not have used all different learning rates if you stop it too early.

thijsgelton avatar May 13 '22 10:05 thijsgelton

Thanks @thijsgelton ! I feel like I need to repeat myself too often :see_no_evil:

FabianIsensee avatar Aug 23 '22 09:08 FabianIsensee