Worked examples — Feedforward network — forward pass
Before anything, plain-word reminders (no symbol used below is left undefined):
We will use four activation curves. Each answers a different question, so we say why we reach for it — and each is plotted so you can see its shape before we ever compute with it:
The figure below draws all four so their behaviour is visual first, algebra second — notice ReLU's hard elbow at , sigmoid's smooth climb from to , and tanh's S-shape from to :

Read the plot before moving on: the yellow ReLU is flat (dead) for then a ramp; the blue sigmoid hugs far left and far right; the pink tanh does the same but between and . These three shapes explain every "why did this neuron die / saturate / go negative" moment on this page.
Here is appearing: is the number whose exponential curve grows at a rate equal to its own height. We reach for it in sigmoid/tanh/softmax because it is the natural currency of "smooth squashing" — it makes the derivatives clean later during backprop. For hand-work you only need: , , .
The scenario matrix
Every cell below is a distinct thing a forward pass can be asked to do. The examples that follow cover all of them.
| Cell | Scenario | Covered by |
|---|---|---|
| A | Positive-only inputs, ReLU hidden, linear output (plain regression) | Ex 1 |
| B | Sign mix in — some neurons fire, some die (ReLU zeroing) | Ex 2 |
| C | Zero input vector (degenerate) — bias-only output | Ex 3 |
| D | Huge input → saturation of a squashing curve (limiting behaviour) | Ex 4 |
| E | Sigmoid output read as a probability + a decision threshold | Ex 5 |
| F | tanh hidden layer producing signed activations | Ex 6 |
| G | Softmax multi-class: raw scores → probabilities summing to 1 | Ex 7 |
| H | Real-world word problem (stall-warning autopilot) end-to-end | Ex 8 |
| I | Exam twist: "collapse" — network with no nonlinearity is just one affine map | Ex 9 |
Forecast: Guess whether both hidden neurons survive ReLU, then guess before reading on.
- Pre-activation, layer 1. with , giving . Why this step? Each neuron is a dot product of its weight row with the incoming activation, then the bias is added — this is the only way scores enter the machine.
- Activate. with . Both scores are positive, so ReLU leaves them: . Why this step? ReLU only deletes negatives; positives pass unchanged, so no neuron dies here — look back at the yellow curve in the intro figure, both points sit on its rising ramp.
- Output layer. . Linear output ⇒ the last activation is . Why this step? Linear output keeps the prediction unbounded — right for a regression number.

What the figure shows: the two blue input nodes feed both yellow hidden nodes (both alive, values and ), which feed the single pink output node holding — a picture of "dot, add, squash" happening twice.
Verify: Recompute by full sum: . ✓ Units: whatever the target is (e.g. N of thrust) — a single real number, as a regression head should give.
Forecast: One neuron will be negative before ReLU. Which one, and does its weight into the output still matter?
- Pre-activation. , . So . Why this step? The second row has a negative weight on feature 1, so it produces a negative score — the classic setup for ReLU to zero it.
- Activate. : , , so . Neuron 2 is dead for this input. Why this step? ReLU sets every negative to exactly — a hard cliff, visible as the flat left part of the yellow curve.
- Output. . The dead neuron's weight multiplies , contributing nothing. Why this step? A silent neuron carries no information forward no matter how big its outgoing weight — this is why ReLU creates sparse activity.

What the figure shows: the same 2-2-1 graph, but the second hidden node is greyed out at value — its outgoing edge is drawn faint to signal "no signal passes", so is built from neuron 1 and the bias alone.
Verify: . ✓ Sanity: if we removed neuron 2 entirely the answer would be identical — confirming it is inactive here.
Forecast: With all inputs zero, what survives — and what does the output read?
- Pre-activation. for any weights, so ; the first two entries are . Why this step? Multiplying a grid by a zero column gives a zero column — the input contributes nothing, the machine falls back to bias alone. This is the meaning of bias: the output when the input says nothing.
- Activate (sigmoid). : , . Numerically so ; so . Since this is the last layer, these are the outputs . Why this step? Sigmoid squashes each bias into ; a positive bias lands above , a negative bias below — read it off the blue curve in the intro figure at .
Verify: Note because sigmoid is symmetric: . ✓
Forecast: Guess and to two decimals before computing.
- Compute . , so . Why this step? A large positive makes vanish, pinning the output at the top rail .
- Compute . , so . Why this step? A large negative makes explode, pinning the output at the bottom rail .

What the figure shows: the blue sigmoid with two marked dots at sitting flat against the dashed rails and — the curve is so flat there that moving barely moves , which is exactly the danger of saturation.
Limiting behaviour: as , ; as , . In the flat rails the curve barely changes, so once inputs are huge the network becomes insensitive — the reason we normalize inputs.
Verify: and to 6 decimals; also . ✓
Forecast: Compute ; is it above or below (the line of sigmoid)?
- Pre-activation. . Why this step? One dot product plus bias gives the single decision score.
- Sigmoid. . Why this step? Sigmoid turns the score into a probability so we can threshold it.
- Threshold. predict fault. Why this step? exactly when ; here , consistent.
Verify: Because , sigmoid must exceed ; indeed . ✓ The output lies in as a probability must.
Forecast: One neuron's score will be , the other nonzero. Predict the tanh of each.
- Pre-activation. ; . Why this step? Neuron 1 sums a cancelling pair → exactly ; neuron 2 reinforces → .
- tanh. : ; . Why this step? tanh passes zero straight through and gives a signed value near for a positive score — its output range lets hidden units be negative, unlike ReLU.

What the figure shows: the pink tanh curve with dots at (lands on ) and (lands near ), between the dashed rails — proof that tanh can output negative values, the feature ReLU lacks.
Verify: exactly; . ✓ Both lie in .
Forecast: Which class wins, and will the three probabilities add to exactly ?
- Exponentiate each score. , , . Why this step? is always positive and turns bigger scores into much bigger numbers — softmax's way of making a "soft argmax".
- Sum. . Why this step? Dividing by the total forces the outputs to sum to , so they read as probabilities.
- Divide. , , . Why this step? Each ratio is that class's share of the total exponential mass.

What the figure shows: three chalk bars, tallest for Nominal (), matching the largest raw score — the picture of softmax turning ranked scores into a probability bar chart that sums to .
Verify: . ✓ Argmax is class 1 (Nominal), matching the largest raw score . ✓
Forecast: High should push toward a stall warning. Will the output exceed ?
- Hidden pre-activation. . . Why this step? Two dot products build the hidden scores from the sensors.
- ReLU. : , , so — both hidden neurons die. Why this step? Both scores are negative; ReLU zeroes both, a fully degenerate hidden layer.
- Output. ; . Why this step? With the hidden layer silent, only the output bias speaks — and it says "no warning".
- Decision. no stall warning.
Verify: . ✓ Sanity: because , sigmoid must fall below — consistent. (Lesson: raw was fine here; this same net does fire for larger , showing why the dead-neuron case is not "always no".)
Forecast: Two stacked linear maps — guess the single equivalent slope and intercept.
- Layer 1. (identity leaves it linear). Why this step? With no squashing, the activation equals the pre-activation.
- Layer 2. . Why this step? Substituting shows the whole network is the single affine map — proving stacked linear layers gain nothing. This is exactly why real networks need nonlinear .
- Evaluate. At : . Why this step? Plugging into the collapsed line gives the same answer as walking both layers — the check below confirms it.
Verify: Direct two-step: , then . ✓ Matches the collapsed line at . ✓
Recall Quick self-check
ReLU of a negative pre-activation equals what? ::: Exactly — the neuron is silent. An activation vector is defined how, in terms of ? ::: — the curve applied to every entry of . With input , the pre-activation equals what? ::: The bias (since ). Softmax outputs always satisfy which one property? ::: They are positive and sum to exactly . Two stacked linear layers are equivalent to what? ::: A single affine map .