You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to play around with additional loss functions which introduce additional hyperparameters (e.g. Focal Loss). I tried to figure out a (relatively) simple way to add those without changing the source code but in the end didn't find a way that satisfied me.
Is there a way to easily add additional hyperparameters which are also included in experiment planning or at least can be incorporated into the Plansmanager? From my perspective, I'd need to introduce a new Experiment Planner, but also edit the Plans- or Configuration Manager for the changes to properly flow through all the processes - which would require a lot of changes for "just" a hyperparameter or two.
Am I missing something or is this simply not supported by nnUNet?
Thanks a lot and all the best,
Konstantin
The text was updated successfully, but these errors were encountered:
if you want to add another loss function you will need to touch the source code, except for some losses, which are included in nnUNet already. You can find existing trainers with some other loss functions here.
Focal loss is not implemented in nnUNet so far, but if I find the time I can try to put it into the repo, I have a nnUNet specific implementation laying around somewhere, which would however need to be cleaned a bit.
We can maybe include space for loss hyperparameter somehow in the plans, so you can change those without fiddling around with the source code, but I guess that only makes sense if we have more than one or two loss functions in there, which actually require hyperparameters (even focal loss with gamma=2 works fine most of the time).
I will discuss that with Fabi but this will very likely not have high priority for now.
Here, hyperparams would be defined as a dictionary in the plans file. This approach seems quite flexible for accommodating any hyperparameter changes or additions, and it would require minimal implementation effort.
Hi,
I want to play around with additional loss functions which introduce additional hyperparameters (e.g. Focal Loss). I tried to figure out a (relatively) simple way to add those without changing the source code but in the end didn't find a way that satisfied me.
Is there a way to easily add additional hyperparameters which are also included in experiment planning or at least can be incorporated into the Plansmanager? From my perspective, I'd need to introduce a new Experiment Planner, but also edit the Plans- or Configuration Manager for the changes to properly flow through all the processes - which would require a lot of changes for "just" a hyperparameter or two.
Am I missing something or is this simply not supported by nnUNet?
Thanks a lot and all the best,
Konstantin
The text was updated successfully, but these errors were encountered: