Machine learning architectures in plain TikZ: dense layers, convolutional pipelines, attention, and transformers.


Inputs, weights, a sum, and an activation: one artificial neuron.


Three inputs, two hidden layers of four neurons, and two outputs, fully connected.


One recurrent cell drawn at three time steps, sharing the weights W between them.


An image passing through convolution and pooling layers to a dense classifier, drawn as blocks.


Queries and keys multiplied, scaled, masked, and normalized, then applied to the values.


Multi-head attention and a feed-forward block, each with a residual connection and normalization, repeated N times.