Skip to content

Layered network in 3D

Type a text and watch two letters go through 16 neurons to the prediction.

What this lab shows

A layered network connects the last two letters to 16 neurons, and these to 27 outputs, one for each possible letter. The colored connections show what pushes the prediction toward each letter. It only sees two letters back: this is called a fixed window.

A tiny network, really trained with numpy on simple sentences in Portuguese. It makes many mistakes outside that kind of sentence.

How to use it

  1. Type a short text.
  2. Rotate the scene and follow the lines from the two lit letters to the neurons in the middle.
  3. Use "most likely letter" and "drawn letter" to let the network write on its own.
LabLayered network in 3DTry it

After “o␣gato”, the network thinks the next letter is:

  1. ␣54%
  2. r25%
  3. d13%
  4. m2.5%
  5. n1.9%

Example calculated with the trained network (the interactive version needs JavaScript).

What to notice: If you change only the first of the two letters, the prediction changes. But nothing beyond the window counts: the network does not remember the start of the sentence.

Books that use this lab

No published book uses this lab yet.