AI & Legal Technology Laboratory · Interactive demo
Teaching an MLP to draw sin(x) + cos(2x)
1 input→8 ReLU→8 ReLU→1 linear
A multi-layer perceptron learns a noisy one-variable function. It receives a single input, x (scaled to [−1, 1]), passes it through two hidden layers of 8 ReLU neurons, and outputs a single number ŷ. Press Train to watch gradient descent bend the output curve toward the data. Drag across the fit plot to choose which x flows through the network diagram.