- Follow example of
GANDLF.models.unet. - Define a new submodule under
GANDLF.models, and define a class that inherits fromGANDLF.models.ModelBase. - Ensure that a forward pass is implemented.
- All parameters should be taken as input, with special parameters (for e.g.,
residualConnectionsforunet) should not be exposed to the parameters dict, and should be handled separately via another class.- For example,
GANDLF.models.unet.unethas aresidualConnectionsparameter, which is not exposed to the parameters dict, and a separate classGANDLF.models.unet.resunetis defined which enables this flag.
- For example,
- Add the model's identifier to
GANDLF.models.__init__.global_model_dictas appropriate. - Call the new mode from the config using the
modelkey. - To update the tests, append the new model key to either in
all_models_segmentation,all_models_segmentationorall_models_classificationin test_full.py