LearnDeep learning
Neural network
Stack neurons in layers and watch a network learn shapes that no straight line could ever draw.
Choose the data and press Train. The squares in the panel show what each neuron responds to. Click to add points in the chosen colour.
How it works
Simple pieces, complex shapes.
A neural network passes the inputs through layers of neurons. Each neuron draws its own straight line, then bends the result with an activation function such as tanh. The next layer combines those bent pieces into curves, rings and spirals.
Training adjusts every weight to lower the loss, here the cross-entropy between the predictions and the true colours. The gradients come from backpropagation, and the updates use Adam, a refined version of gradient descent. Each square in the panel shows one neuron's output across the whole chart.
More neurons and more layers can fit more complex shapes, but they also need more data and can overfit. The same idea, scaled up to millions or billions of weights, is behind image recognition and language models.