peal.architectures.module_blocks.create_cnn_layer¶
- peal.architectures.module_blocks.create_cnn_layer(block_type, config, input_channels, activation)[source]¶
The create_cnn_layer function creates a CNN layer. :param block_type: The type of the block. :param config: The config of the block. :param input_channels: The number of input channels. :param activation: The activation function.
- Returns:
The created CNN layer.
- Parameters:
block_type (VGGBlock | ResnetBlock)
config (ResnetConfig | VGGConfig)
input_channels (pydantic.types.PositiveInt)
activation (torch.nn.Module)