Interactive Neural Network Builder

Welcome to an interactive learning tool designed to demystify neural networks! A neural network is a computing system inspired by the biological brain, which learns to recognize patterns. Here, you can build, visualize, and experiment with a simple network, starting with a pre-built configuration called Martin's Image Recognition Machine (MIM).

Network Controls

Use these controls to modify the network's structure and behavior. Adding hidden layers increases its complexity, allowing it to learn more intricate patterns. Changing the activation function alters how neurons process information.

Input Pattern (4-pixel image)

This is the data you feed into the network. Our simple network takes a 2x2 pixel image as input. Click the squares to toggle them between black (1) and white (0), or use the preset buttons to create common patterns.

Live Network Visualization

This diagram shows the network in action. Circles are neurons, and lines are connections. The brightness of a neuron indicates its activation level (how strongly it's firing). The color and thickness of a connection represent its weight (blue for positive, red for negative).

Network Output

The output layer shows the network's final decision. For the default MIM configuration, the two outputs are trained to detect the two diagonal patterns. A value close to 1.0 indicates a strong detection of that pattern.

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

Values closer to 1.0 indicate stronger detection

Weight Matrices

Weights are the most critical part of a neural network; they are the values the network "learns." A weight determines the strength and sign of a connection between two neurons. Here, you can manually adjust them to see how they affect the output.

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