dacapo.experiments.architectures.architecture
Module Contents
Classes
An abstract base class for defining the architecture of a neural network model. |
- class dacapo.experiments.architectures.architecture.Architecture(*args, **kwargs)
An abstract base class for defining the architecture of a neural network model. It is inherited from PyTorch’s Module and built-in class ABC (Abstract Base Classes). Other classes can inherit this class to define their own specific variations of architecture. It requires to implement several property methods, and also includes additional methods related to the architecture design.
- abstract property input_shape: funlib.geometry.Coordinate
Abstract method to define the spatial input shape for the neural network architecture. The shape should not account for the channels and batch dimensions.
- Returns:
The spatial input shape.
- Return type:
Coordinate
- property eval_shape_increase: funlib.geometry.Coordinate
Provides information about how much to increase the input shape during prediction.
- Returns:
An instance representing the amount to increase in each dimension of the input shape.
- Return type:
Coordinate
- abstract property num_in_channels: int
Abstract method to return number of input channels required by the architecture.
- Returns:
Required number of input channels.
- Return type:
int
- abstract property num_out_channels: int
Abstract method to return the number of output channels provided by the architecture.
- Returns:
Number of output channels.
- Return type:
int
- property dims: int
Returns the number of dimensions of the input shape.
- Returns:
The number of dimensions.
- Return type:
int
- scale(input_voxel_size: funlib.geometry.Coordinate) funlib.geometry.Coordinate
Method to scale the input voxel size as required by the architecture.
- Parameters:
input_voxel_size (Coordinate) – The original size of the input voxel.
- Returns:
The scaled voxel size.
- Return type:
Coordinate