What this page adds. The
basic calculator trains one small
network on x and y, in your browser, with plain gradient descent. This page
trains the same x and y with up to three
hidden layers, mini-batch SGD or Adam, and a validation split. To do that it
sends your table to the server, trains there in chunks of
epochs, and sends the numbers back. Nothing is stored, but the data does leave
your machine. If that matters for your data, use the basic page. The
machine learning basics article
explains every setting.
A lower training loss is not always a better network: hold some rows out with
Validation and watch whether their loss turns up while the training loss keeps
falling.
- Paste your data into the Input grid โ straight from a
spreadsheet, or as CSV/TSV text โ or import a CSV/TSV file.
Two columns, x and y, up to 5,000 rows. The sample select above the grid
loads one of three samples: sin x, sin x + noise, |x โ 5|. A row with x and
an empty y is not trained on; it gets a prediction.
- Pick the settings โ Layers (1 to 3 hidden layers) and
Neurons (per layer), Activation, Optimizer, Learning rate, Batch (rows per
update, for Mini-batch SGD and Adam; Gradient descent always uses every
row), Validation (% of rows held out), Epochs (up to 50,000) and Seed.
Changing the network, Validation or Seed starts a new one.
- Press Train. The server trains 500 epochs at a time and the
charts redraw after each chunk. The upper chart shows your data and the
network's curve. The lower chart shows Loss, the
training and validation loss, or Network, a diagram of the network (line colour
= the weight's sign, width = its size). x and y are standardized before training, so the loss is
in scaled units: 1 means no better than the average. The server time shows
beside the button.
- Stop pauses after the chunk in flight; Train
again continues from the same weights until Epochs is reached.
Reset starts again from the seed.
- Output โ x and the network's y. Export
saves it as a CSV/TSV file.
- Network โ its select shows Network or Loss. Network is the
whole network in one grid, in scaled units: the activation and seed rows; x
and y with the mean and standard deviation used to scale them, from the
training rows. With one hidden layer the rows are the basic page's: c, the
output bias, then h1, h2, โฆ with the neuron's output weight v, input weight w
and bias b. With two or three layers each neuron has its own row - h1.1,
h2.1, โฆ then out - with its bias b, then its weight from every neuron before
it. So a layer-1 neuron has one weight, from x, and a layer-2 neuron one
weight per neuron of layer 1 (Layer,
Fig 3 and Math 3 of the article). Type or paste a network into the grid and press apply,
so a network copied from the basic page works here. Loss is the training
record, epoch by epoch. Its export writes two CSV files at
once: the network rows, and the loss record beside them as
<name>_loss.csv. load reads a network
back - a CSV / TSV from either page - then asks whether to load the loss
file too: Yes, and you pick its _loss file. Layers, Neurons,
Activation and Seed follow the network. Predict then gives the network's outputs
for every row, with no training; Train continues from the
loaded weights (Adam starts its moments again).
- Why only one loss point after apply or load? A network file,
or rows you paste, holds the network itself - its weights, biases and scaling -
not the training that made it. So apply, or a load without its loss file, starts the loss record again with a single
value: the network's loss on the rows in the grid now, a dot on the loss chart.
No training has run yet. Press Train and the curve grows from
that point. Load the loss file too and the record carries on instead.