Lab · c18.s04.L1

Computation graph

A computation graph remembers one forward value per block, and the backward pass reads each stored value once and frees it.

Question: What does the computer remember?

Computation graphA chain of rounded blocks runs left to right from input to output. In the forward pass each block lights in turn and adds its computed number to a memory bar below, one slot per block, until eight slots are filled; at twelve blocks, twelve slots. The sweep then reverses: blocks light right to left, each reads its stored number and empties its slot, until the bar is empty. A readout prints the stage, the slots held, and the peak.Computation graphh_l = tanh(1.3 h_{l-1} + 0.1), h_0 = x = 0.7Memory — one slot per block; a filled slot holds the forward value that block producedGold cell: a forward value is held. Dashed cell: freed. The russet outline marks the block that just ran or was read.Space plays or pauses; Left and Right step one stage; Home and End jump to the first and last stage.x0.7000x = 0.7000h1tanh(1.3 h0+ 0.1)h2tanh(1.3 h1+ 0.1)h3tanh(1.3 h2+ 0.1)h4tanh(1.3 h3+ 0.1)h5tanh(1.3 h4+ 0.1)h6tanh(1.3 h5+ 0.1)h7tanh(1.3 h6+ 0.1)h8tanh(1.3 h7+ 0.1)1empty2empty3empty4empty5empty6empty7empty8emptyIdle · block 0Nothing is stored yet. The graph is labels and edges. Press play, or step forward, to run the forward pass.Slots held: 0 of 8 · peak: 8
Re-simulated Re-simulated: every node value, slot count and stage is computed exactly by data/scripts/c18.s04.L1.py from h_l = tanh(1.3 h_{l-1} + 0.1) with h_0 = 0.7, and nothing is measured from a source. The frames step through the forward pass, which stores one value per block, and the backward pass, which reads each stored value once and frees its slot. The depth control runs from 2 to 12 blocks: at the default 8 the bar fills 8 slots and empties them in 8 backward reads, and at 12 it peaks at 12.
Lab controls
8 blocks

Left/Down: -1, Right/Up: +1; Page Down: -2, Page Up: +2, clamped to 2 and 12; Home: 2; End: 12

700 ms per stage

Left/Right: -100 or +100 ms; Home: 200 ms; End: 1600 ms

Frame 1 of 17: Idle: nothing storedNothing is stored yet. The graph is labels and edges. Press play, or step forward, to run the forward pass. This chain has 8 blocks, so the peak occupancy will be 8 slots.

Idle: nothing stored. Nothing is stored yet. The graph is labels and edges. Press play, or step forward, to run the forward pass. This chain has 8 blocks, so the peak occupancy will be 8 slots.

Keyboard: Space plays or pauses, Left and Right step, Home goes to the first frame, End goes to the last frame.

Text description of this lab

A chain of rounded blocks runs left to right from input to output. In the forward pass each block lights in turn and adds its computed number to a memory bar below, one slot per block, until eight slots are filled; at twelve blocks, twelve slots. The sweep then reverses: blocks light right to left, each reads its stored number and empties its slot, until the bar is empty. A readout prints the stage, the slots held, and the peak.

Return to the section that hosts this lab

Caption status: re-simulated. Every lab declares one of published, re-simulated, schematic, synthetic or interpolated.