dacapo.experiments.architectures.dummy_architecture
Classes
A class used to represent a dummy architecture layer for a 3D CNN. |
Module Contents
- class dacapo.experiments.architectures.dummy_architecture.DummyArchitecture(architecture_config)
A class used to represent a dummy architecture layer for a 3D CNN.
- channels_in
An integer representing the number of input channels.
- channels_out
An integer representing the number of output channels.
- conv
A 3D convolution object.
- input_shape
A coordinate object representing the shape of the input.
- forward(x)
Performs the forward pass of the network.
- num_in_channels()
Returns the number of input channels for this architecture.
- num_out_channels()
Returns the number of output channels for this architecture.
Note
This class is used to represent a dummy architecture layer for a 3D CNN.
- channels_in
- channels_out
- conv
- property input_shape
- Returns the input shape for this architecture.
- Returns:
Input shape of the architecture.
- Return type:
Coordinate
- Raises:
NotImplementedError – This method is not implemented in this class.
Examples
>>> dummy_architecture.input_shape Coordinate(x=40, y=20, z=20)
Note
This method is used to return the input shape for this architecture.
- property num_in_channels
- Returns the number of input channels for this architecture.
- Returns:
Number of input channels.
- Return type:
int
- Raises:
NotImplementedError – This method is not implemented in this class.
Examples
>>> dummy_architecture.num_in_channels 1
Note
This method is used to return the number of input channels for this architecture.
- property num_out_channels
- Returns the number of output channels for this architecture.
- Returns:
Number of output channels.
- Return type:
int
- Raises:
NotImplementedError – This method is not implemented in this class.
Examples
>>> dummy_architecture.num_out_channels 1
Note
This method is used to return the number of output channels for this architecture.
- forward(x)
Perform the forward pass of the network.
- Parameters:
x – Input tensor.
- Returns:
Output tensor after the forward pass.
- Return type:
Tensor
- Raises:
NotImplementedError – This method is not implemented in this class.
Examples
>>> dummy_architecture = DummyArchitecture(architecture_config) >>> x = torch.randn(1, 1, 40, 20, 20) >>> dummy_architecture.forward(x)
Note
This method is used to perform the forward pass of the network.