napari_cellseg3d.code_models.models.TEMPLATE_model
This is a template for a model class. It is not used in the plugin, but is here to show how to implement a model class.
Please note that custom model implementations are not fully supported out of the box yet, but might be in the future.
Classes:
| Name | Description |
|---|---|
ModelTemplate_ |
Template for a model class. This is not used in the plugin, but is here to show how to implement a model class. |
ModelTemplate_
Bases: ABC
Template for a model class. This is not used in the plugin, but is here to show how to implement a model class.
Methods:
| Name | Description |
|---|---|
__init__ |
Reimplement this as needed; only include input_image_size if necessary. For now only in/out channels = 1 is supported. |
forward |
Reimplement this as needed. Ensure that output is a torch tensor with dims (batch, channels, z, y, x). |
Source code in napari_cellseg3d/code_models/models/TEMPLATE_model.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
__init__
abstractmethod
__init__(input_image_size, in_channels=1, out_channels=1, **kwargs)
Reimplement this as needed; only include input_image_size if necessary. For now only in/out channels = 1 is supported.
Source code in napari_cellseg3d/code_models/models/TEMPLATE_model.py
17 18 19 20 | |
forward
abstractmethod
forward(x)
Reimplement this as needed. Ensure that output is a torch tensor with dims (batch, channels, z, y, x).
Source code in napari_cellseg3d/code_models/models/TEMPLATE_model.py
22 23 24 25 | |