# `LeNet5`

### *class* capymoa.core.torch.ann.LeNet5[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/core/torch/ann/_lenet.py#L4)

Bases: [`Module`](https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module)

LeNet-5 [[Lecun1998]](#lecun1998) convolutional neural network for 28x28 grayscale images.

* <a id='lecun1998'>**[Lecun1998]**</a> 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](https://docs.python.org/3/builtins/functions.html#int), in_shape: [tuple](https://docs.python.org/3/builtins/stdtypes.html#tuple)[[int](https://docs.python.org/3/builtins/functions.html#int), [int](https://docs.python.org/3/builtins/functions.html#int), [int](https://docs.python.org/3/builtins/functions.html#int)] = (1, 28, 28))[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/core/torch/ann/_lenet.py#L12)

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

#### forward(x: [Tensor](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor)) → [Tensor](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/core/torch/ann/_lenet.py#L24)

Forward pass of the LeNet-5 model.

#### T_destination *= ~T_destination*

#### call_super_init *: [bool](https://docs.python.org/3/builtins/functions.html#bool)* *= False*

#### dump_patches *: [bool](https://docs.python.org/3/builtins/functions.html#bool)* *= False*

#### training *: [bool](https://docs.python.org/3/builtins/functions.html#bool)*
