前向传播是输入按当前参数从前到后流过网络并产生预测的过程。它只负责“照现在的参数算一次答案”,不负责把误差传回去修改参数。A forward pass moves input through the network under the current parameters to produce a
prediction. It computes one answer; it does not send error backward or update
parameters.
01 · 预测不是凭空跳出来01 · Predictions do not appear from nowhere
最终两根概率柱出现之前,输入究竟经过了哪些乘、加和激活?Before the final probability bars appear, which multiplications, additions, and
activations did the input pass through?
→
02逐层点亮一次前向传播Light Up One Forward Pass
步进计算型Stepwise compute
当前阶段Current stage
0/4
逐层向前moving forward
已显示乘积Products shown
0
条边edges
最终预测Final prediction
—
第 4 步出现appears at step 4
按“下一步”四次:输入 → 隐藏层 → 输出 logits →
概率。概率柱在最后一步之前保持隐藏。Press “Next step” four times: inputs → hidden layer → output logits →
probabilities. Probability bars remain hidden until the final step.
03一次前向传播的 4 站Four Stops in One Forward Pass
顺序不可跳Order matters
STAGE 01
读取输入Read inputs
x1 = 0.8、x2 = 0.3 进入网络。x1 = 0.8 and x2 = 0.3 enter the network.
STAGE 02
隐藏层乘加Hidden multiply-add
每条输入边乘权重,再汇总并过 ReLU。Each input edge multiplies by a weight, then sums and passes ReLU.
STAGE 03
输出 logitsOutput logits
隐藏值沿第二组权重形成红蓝两个分数。Hidden values follow a second weight set into red and blue scores.
STAGE 04
概率与预测Probability and prediction
softmax 把两个 logits 变成总和为 1 的概率。Softmax turns two logits into probabilities summing to one.
04最小机制:后一层只能用前一层的结果Minimal Mechanism: Each Layer Uses the Previous Result
h = ReLU(W1x); p = softmax(W2h)
x → h = ReLU(W1x) → o = W2h → p
上方每按一步才解锁右侧所需数值。没有 h 就不能计算 o,没有 o
就不能得到最终 p。Each step unlocks values needed to its right. Without h, o cannot be computed;
without o, the final p cannot exist.
输入乘权重Inputs × weights形成隐藏加权和Form hidden sums
隐藏层激活Activate hidden layer得到下一层输入 hProduce next input h
输出再归一化Normalize outputs最后出现概率预测Probability appears last
05边界实验:跳过隐藏层直接要答案Boundary Test: Demand an Answer Without Hidden Values
主动制造失败Create a failure
缺中间值,后层无从计算No intermediate values, no later computation
重置后直接索要最终概率,却不计算隐藏层。输出层没有 h1、h2,概率柱只能保持空白。After reset, request final probabilities without computing hidden values. The output
layer lacks h1
and h2, so the bars must remain blank.
尚未执行。请按顺序逐层计算。Not run yet. Compute each layer in order.
✗ 网络直接从输入猜出概率。The network jumps directly from input to probability.
→ ✓ 每一层都使用前层结果继续乘加与激活。Every layer uses previous results for more multiply-adds and
activations.
✗ 前向传播会修改权重。A forward pass updates weights.
→ ✓ 它只使用当前权重计算预测。It only uses current weights to compute a prediction.
✗ 中间层数值可以省略不算。Intermediate values can be skipped.
→ ✓ 后层输入正是前层已经算出的输出。A later layer's input is the earlier layer's computed output.
06 · 一句话带走06 · One line to keep
前向传播让输入按当前参数从前到后逐层计算并产生预测;连续点四步,就能核对每条边的乘加值与最终概率怎样依次出现。A forward pass computes from input to prediction layer by layer under current
parameters. Advance four steps to verify how edge products and final probabilities
appear in order.