spyrit.core.nnet.ConvNet
- class spyrit.core.nnet.ConvNet[source]
Bases:
ModuleA simple convolutional neural network model, without batch normalization.
This model is composed of three convolutional layers. The first two layers are followed by a ReLU activation function. The last layer does not have any activation function. There is no batch normalization layer in this model. To use a convolutional neural network with batch normalization, use the
ConvNetBNclass.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. - ‘conv2’: The second convolutional layer. - ‘relu2’: The ReLU activation function after the second layer. - ‘conv3’: The third convolutional layer.
Methods
forward(x)Forward pass of the ConvNet model.