spyrit.core.nnet.DConvNet
- class spyrit.core.nnet.DConvNet[source]
Bases:
ModuleA slightly deeper convolutional neural network model, with batch normalization.
This model is composed of four convolutional layers. The first three 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 sizes of the four layers are 9, 1, 3, and 5. The stride of all layers is 1, and the padding of the four layers are 4, 0, 1, and 2, respectively. The number of output channels of the first layer is 64, the second layer is 64, the third layer is 32, and the fourth 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. - ‘relu3’: The ReLU activation function after the third layer. - ‘BN3’: The batch normalization layer after the third layer. - ‘conv4’: The fourth convolutional layer.
Methods
forward(x)Forward pass of the DConvNet model.