Runs entirely in your browser

Neural Network Calculator

Paste, type, or upload a table of inputs (X) and outputs (Y), choose a feedforward, RNN, LSTM or GRU network, train it, and predict new rows.

Data

Input variables (X)
Output variables (Y)
X-1X-2Y-1
000
011
101
110
0.90.1—
0.10.1—
+1 more row

Network

How this calculator works

Each neuron takes a weighted sum of its inputs, adds a bias, and passes the result through an activation function. Training repeats this loop: run every row forward, measure the error against Y, and use backpropagation to nudge the weights. The learning rate sets the step size, the decay rate shrinks it over time, and momentum reuses part of the previous step to speed up convergence.

Training stops at whichever comes first: the error threshold, the maximum iterations, or the maximum run time. Text values in Y are one-hot encoded and predicted as the category with the highest output.

RNN, LSTM and GRU add a hidden state that carries information from one time step to the next. A plain RNN updates that state directly, which works for short sequences but tends to forget early information in long ones. LSTM adds a separate cell state plus forget, input and output gates that learn what to keep, add, or expose at each step, so it can carry information across many more steps. GRU merges those ideas into two gates (reset and update) for a lighter network that's faster to train while keeping most of the benefit.

When you set a test split, that percentage of rows is set aside before any training happens, so the test score is a fairer estimate of how the network would do on new data. In the network diagram, feedforward connections are colored by the sign of their weight and sized by strength; for recurrent networks the dashed ring marks the hidden state feeding back into itself at every time step.

Common questions