models package
Subpackages
- models.backbones package
- Submodules
- models.backbones.VGG module
- models.backbones.adaptive_unet module
- models.backbones.baby_cnn module
- models.backbones.backboned_unet module
- models.backbones.deeplabv3 module
- models.backbones.deeplabv3_aspp module
- models.backbones.deeplabv3_resnet module
- models.backbones.doc_ufcn module
- models.backbones.resnet module
- models.backbones.resnetdd module
- models.backbones.segnet module
- models.backbones.unet module
- Module contents
- models.headers package
Submodules
models.backbone_header_model module
- class BackboneHeaderModel(backbone: Union[LightningModule, Module], header: Union[LightningModule, Module], backbone_output_layer: Optional[str] = None)[source]
Bases:
LightningModule
A generic model class to provide the possibility to create different backbone/header combinations. The backbone and header compatibility can be tested with the callback
CheckBackboneHeaderCompatibility
during runtime. The loading of the different parts is done inexecute
.- Parameters:
backbone (Union[pl.LightningModule, torch.nn.Module]) – The backbone model
header (Union[pl.LightningModule, torch.nn.Module]) – The header model
backbone_output_layer (Optional[str]) – The name of the output layer of the backbone. If None, the last layer of the backbone is used.
- forward(x)[source]
Same as
torch.nn.Module.forward()
.- Parameters:
*args – Whatever you decide to pass into the forward method.
**kwargs – Keyword arguments are also possible.
- Returns:
Your model’s output
- training: bool