Interactive Neural Network Builder

Explore how a neural network learns. This site lets you build and watch a tiny network work. Start with Martin's Image Recognition Machine (MIM) and change it to see what happens.

Network Controls

These buttons let you adjust the network. Add layers to give it more thinking steps, or change the activation function to see how the neurons react.

Input Pattern (4-pixel image)

The network reads a tiny 2x2 picture. Click a square to flip it on or off, or use a preset to load a pattern.

Live Network Visualization

The picture below shows the network working. Circles are neurons and lines are connections. Bright circles mean high activation. Line color and thickness show the weight: blue for positive, red for negative.

Network Output

The output layer shows what the network thinks. In MIM, the two numbers tell how strongly each diagonal is detected. Values near 1 mean strong matches.

In the original MIM: Output 0 = Diagonal \, Output 1 = Diagonal /

Values closer to 1.0 indicate stronger detection

Weight Matrices

Weights are what the network learns. They set how strongly one neuron influences another. Change them to see how the output shifts.

Glossary of Terms

Neural Network
A computational model inspired by the human brain, composed of interconnected nodes (neurons) that process information to recognize patterns and make decisions.
Neuron
The basic unit of a neural network. It receives input, processes it, and produces an output value (its activation).
Layers
Neurons are organized into layers. The Input Layer receives the initial data. Hidden Layers perform intermediate computations. The Output Layer produces the final result.
Weight
A value that represents the strength of the connection between two neurons. Higher weights (positive or negative) mean the input from one neuron has a greater influence on the next.
Bias
A value added to the sum of weighted inputs before the activation function is applied. A bias allows a neuron to shift its activation function, making it more or less likely to fire.
Activation Function
A mathematical function that determines the output of a neuron based on its total input. It introduces non-linearity, allowing the network to learn complex patterns. Examples: Sigmoid, ReLU, Tanh.
Forward Pass
The process of feeding input data through the network from the input layer to the output layer to generate a prediction.
MIM
Martin's Image Recognition Machine - a simple, hand-crafted neural network designed specifically to recognize diagonal lines in a 2x2 grid.

Try It Yourself