Creates model instances from config. The factory searches for model classes in the models/ folder by looking up the dataset name in the module's namespace.
🧠 UNet2D.py:
- 2D U-Net architecture
- Configurable:
in_channels,num_classes,init_features
🧠 UNet3D.py:
- 3D U-Net architecture
- Configurable:
in_channels,num_classes,init_features
- Create a new file in
models/with your model class that inherits fromBaseModel(or directly fromnn.Module) - Implement
__init__()to define layers - Implement
forward()method that must at least return the output of the model - Add your model class to
__init__.pyin themodels/folder so the ModelFactory can find it:from .YourModel import YourModel
- To use it, specify in config:
"model": {"type": "YourModel", "params": {...}}