nnUNet
nnUNet copied to clipboard
How to set epoch number
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
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.
Thanks @thijsgelton ! I feel like I need to repeat myself too often :see_no_evil: