# Neural networks

> Machine learning architectures in plain TikZ: dense layers, convolutional pipelines, attention, and transformers. 6 examples with complete LaTeX source to copy.

A package in the TeXeR TikZ library: https://texer.org/library/neural-networks

Category: Computer Science. On CTAN: https://ctan.org/pkg/pgf

Tags: neural network, deep learning, machine learning, architecture

## Examples

- [Perceptron](https://texer.org/library/neural-networks/perceptron.md): Inputs, weights, a sum, and an activation: one artificial neuron.
- [Feed-forward network](https://texer.org/library/neural-networks/feed-forward.md): Three inputs, two hidden layers of four neurons, and two outputs, fully connected.
- [Recurrent network, unrolled](https://texer.org/library/neural-networks/rnn-unrolled.md): One recurrent cell drawn at three time steps, sharing the weights W between them.
- [Convolutional network](https://texer.org/library/neural-networks/cnn-pipeline.md): An image passing through convolution and pooling layers to a dense classifier, drawn as blocks.
- [Scaled dot-product attention](https://texer.org/library/neural-networks/attention.md): Queries and keys multiplied, scaled, masked, and normalized, then applied to the values.
- [Transformer encoder layer](https://texer.org/library/neural-networks/transformer-encoder.md): Multi-head attention and a feed-forward block, each with a residual connection and normalization, repeated N times.
