labs / deep learning

Neural Network: Forward Pass

How activations flow through a small network, layer by layer. Visualization only — no training.

  • Neural Networks
  • Deep Learning

This is a fixed, already-built network — the weights don't change and nothing is being trained. What's animated is the forward pass: how one input turns into an output as it flows through the layers.

One layer's worth of math

Every node in a layer does the same two things. First, it combines all the previous layer's outputs using its own weights and a bias:

z = w₁·a₁ + w₂·a₂ + ... + wₙ·aₙ + b

Then it squashes that number through a nonlinear function — here, tanh, which maps any real number into (−1, 1):

a = tanh(z)

That squashing step is what makes a network more than a plain linear equation: stacking layers of unsquashed sums would collapse back into one big linear function, no matter how many layers you added. The nonlinearity is what lets the network represent curves and interactions.

What the picture shows

Each circle is a node, colored by its activation value once it's known — more accent-colored means closer to +1, plain paper-colored means closer to −1. Dashed hollow circles haven't been computed yet. Each line is a weight: accent-green for positive weights, rust for negative, thicker where the weight has more influence.

Press play, or step to walk the input through one layer at a time.

← back to labs