spyrit.core.nnet.ConvNetBN

class spyrit.core.nnet.ConvNetBN[source]

Bases: Module

A simple convolutional neural network model, with batch normalization.

This model is composed of three convolutional layers. The first two layers are followed by a ReLU activation function and a batch normalization layer. The last layer does not have any activation function nor batch normalization.

The kernel size of the first layer is 9, the second layer is 1, and the third layer is 5. The stride of all layers is 1, and the padding of the three layers are 4, 0, and 2, respectively. The number of output channels of the first layer is 64, the second layer is 32, and the third layer is 1.

This class has no arguments.

Attributes:

convnet (torch.nn.Sequential): The convolutional neural network model. It contains an ordered dictionary with the following keys: - ‘conv1’: The first convolutional layer. - ‘relu1’: The ReLU activation function after the first layer. - ‘BN1’: The batch normalization layer after the first layer. - ‘conv2’: The second convolutional layer. - ‘relu2’: The ReLU activation function after the second layer. - ‘BN2’: The batch normalization layer after the second layer. - ‘conv3’: The third convolutional layer.

Methods

forward(x)

Forward pass of the ConvNetBN model.