# `Perceptron`

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

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

A simple feedforward neural network with one hidden layer.

#### \_\_init_\_(schema: [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema), hidden_size: [int](https://docs.python.org/3/builtins/functions.html#int) = 50)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/core/torch/ann/_perceptron.py#L9)

Initialize the model.

* **Parameters:**
  * **schema** – Schema describing the data types and shapes.
  * **hidden_size** – Number of hidden units in the first layer.

#### 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/_perceptron.py#L22)

Forward pass through the network.

* **Parameters:**
  **x** – Input tensor of shape `(batch_size, num_features)`.
* **Returns:**
  Output tensor of shape `(batch_size, num_classes)`.

#### 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)*
