LeNet5#

class capymoa.ann.LeNet5[source]#

Bases: Module

LeNet-5 [Lecun1998] convolutional neural network for 28x28 grayscale images.

[Lecun1998]

Y. Lecun, L. Bottou, Y. Bengio and P. Haffner, “Gradient-based learning applied to document recognition,” in Proceedings of the IEEE, vol. 86, no. 11, pp. 2278-2324, Nov. 1998, doi: 10.1109/5.726791

__init__(num_classes: int, in_shape: tuple[int, int, int] = (1, 28, 28))[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(x: Tensor) Tensor[source]#

Forward pass of the LeNet-5 model.