crested.tl.zoo.simple_convnet#
- crested.tl.zoo.simple_convnet(seq_len, num_classes, num_conv_blocks=3, num_dense_blocks=2, residual=False, first_activation='exponential', activation='swish', output_activation='softplus', normalization='batch', first_filters=192, filters=256, first_kernel_size=13, kernel_size=7, first_pool_size=8, pool_size=2, conv_dropout=0.1, dense_dropout=0.3, flatten=True, dense_size=256, bottleneck=8)#
Construct a Simple ConvNet with standard convolutional and dense blocks.
Used as a baseline model for regression or classification tasks.
- Parameters:
seq_len (
int
) – Width of the input region.num_classes (
int
) – Number of classes to predict.num_conv_blocks (
int
(default:3
)) – Number of convolutional blocks.num_dense_blocks (
int
(default:2
)) – Number of dense blocks.residual (
bool
(default:False
)) – Whether to use residual connections.first_activation (
str
(default:'exponential'
)) – Activation function for the first convolutional block.activation (
str
(default:'swish'
)) – Activation function for subsequent convolutional and dense blocks.output_activation (
str
(default:'softplus'
)) – Activation function for the output layer.normalization (
str
(default:'batch'
)) – Type of normalization (‘batch’ or ‘layer’).first_filters (
int
(default:192
)) – Number of filters in the first convolutional block.filters (
int
(default:256
)) – Number of filters in subsequent convolutional blocks.first_kernel_size (
int
(default:13
)) – Size of the kernel in the first convolutional block.kernel_size (
int
(default:7
)) – Size of the kernel in subsequent convolutional blocks.first_pool_size (
int
(default:8
)) – Size of the pooling kernel in the first convolutional block.pool_size (
int
(default:2
)) – Size of the pooling kernel in subsequent convolutional blocks.conv_dropout (
float
(default:0.1
)) – Dropout rate for the convolutional layers.dense_dropout (
float
(default:0.3
)) – Dropout rate for the dense layers.flatten (
bool
(default:True
)) – Whether to flatten the output before dense layers.dense_size (
int
(default:256
)) – Number of neurons in the dense layers.bottleneck (
int
(default:8
)) – Size of the bottleneck layer.
- Return type:
Model
- Returns:
A Keras model.