-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding additional hyperparameters #2625
Comments
Hi @komiloserdov, 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. Best, |
Hi @ykirchhoff, I managed to resolve the issue by adding some hyperparameters to the Configuration Manager. For example: @property
def alpha(self) -> float:
return self.configuration['alpha'] if 'alpha' in self.configuration.keys() else None Could this approach be generalized by introducing a dictionary for hyperparameters? For example: @property
def hyperparams(self) -> dict:
return self.configuration['hyperparams'] if 'hyperparams' in self.configuration.keys() else None 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. Anyways, thanks for the update! |
Hi @komiloserdov, that might work, I am not sure right now, if there might be any implications from doing it like that, but sounds sensible. If you want, you can create a pull request with these changes, describing it in some detail and then Fabi can have a look at it. Best, |
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: