You get a bonus - 1 coin for daily activity. Now you have 1 coin

Online 5x5 drawing perceptron training and recognition on Intellect

Used 520 times
Online 5x5 drawing perceptron training and recognition

Perceptron: drawing training and recognition

The 5x5 grid provides 25 inputs. You can train up to 5 labeled results.

Add the first training example.

Network outputs and weights

Weights memory: 0 bytes

Five output neurons correspond to five possible results. Connections are colored by weight sign: green is positive, red is negative.

Green line - positive weight: the signal strengthens the next neuron.
Red line - negative weight: the signal suppresses the next neuron.
Line thickness and visibility show the absolute weight: the thicker and brighter the line, the stronger the connection influence.
Labels on lines show the strongest weights; the exact weight of each connection is available when hovering over a line. Clicking a neuron circle opens its values below.
An interactive learning service that shows how a multilayer perceptron learns to recognize simple 5x5 drawings. Draw a pattern, label it, add training examples, and then check probabilities on five output neurons.

Share:



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Your answer option for this service or noticed an error:

This service is intended for visual learning of a perceptron, a multilayer neural network, and basic drawing recognition. Each 5x5 cell is an input feature: a filled cell sends 1, and an empty cell sends 0. The drawing is converted into a vector of 25 numbers, which is then processed by the neural network.
The perceptron consists of an input layer, one or more hidden layers, and an output layer. This educational tool always has 5 output neurons, so up to five labels can be trained. Each output neuron corresponds to one user label. The user can configure the number of hidden layers and neurons per hidden layer. The minimum number of hidden neurons is kept at five and not lower than the number of trained classes.
How a neuron works
Each neuron receives values from the previous layer. Every connection has a weight. A positive weight strengthens the signal, while a negative weight suppresses it. The neuron calculates a weighted sum:
S = x1*w1 + x2*w2 + ... + xn*wn + b
where x values are inputs, w values are connection weights, and b is the bias. The bias shifts the decision threshold of the neuron.
After the weighted sum is calculated, an activation function is applied. Hidden layers use the sigmoid function:
f(S) = 1 / (1 + e^(-S))
The sigmoid maps any number to a value between 0 and 1. This makes it possible for the network to learn nonlinear relationships rather than only simple linear separation.
How training works
When the user draws a pattern, enters a label, and adds a training example, the service stores the 25-input vector and the correct class. If the label is new, it is assigned to one of the five output neurons. The network is then trained on all saved examples.
Training starts with a forward pass. Input values move through hidden layers and then to the output layer. The output layer uses softmax, which converts raw output scores into probabilities. This is why the service can display confidence for every trained label instead of only a single answer.
The service then calculates the error. The correct class has target value 1, while other classes have target value 0. Backpropagation calculates how each weight contributed to the error and slightly adjusts weights and biases to reduce that error. This process repeats for many epochs.
How recognition works
In recognition mode, the new 5x5 drawing is converted into the same 25-number vector. The trained network performs only a forward pass: inputs go through weighted connections, hidden neurons apply activation functions, and output neurons produce probabilities. The highest probability is the most likely label, while the other outputs show possible confusion between trained classes.
The visualization shows neurons, connections, and weights. Green lines represent positive weights, and red lines represent negative weights. Output neurons display both labels and probabilities, so the user can observe the mathematical structure of the network and the recognition result at the same time.

Algorithms Programming

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply