参数与权重 · 模型里会被调动的数字Parameters and Weights · The Numbers Training Adjusts
input × weight + bias → prediction
参数与权重是训练中被调整、共同决定输入输出关系的数值。参数数量不是魔法规模:每个数都要通过具体计算影响预测。Parameters and weights are adjustable values that jointly determine a model's input-output relationship. Parameter
count is not magic scale; each number affects predictions through a specific computation.
01 · 两个旋钮控制一条线01 · Two knobs control one line
同样六个样本,只改两个数字,为什么所有预测和误差会一起移动?With the same six examples, why do every prediction and error move when only two numbers change?
w,b
02权重与截距调音台Weight and Bias Console
直线 + 误差棒Line + error bars
参数数量Parameters
2
w, b
平均绝对误差Mean absolute error
—
MAE
线的方向Line direction
—
随输入变化as input rises
黑线是当前参数给出的预测;橙线连接预测值与真实样本。拖动一个参数时,观察六根误差棒是否同时改变。The black line is the current prediction. Orange lines connect predictions to observed examples. Move one
parameter and watch all six error bars update.
03两个参数各管什么What Each Parameter Controls
共同决定预测Jointly determine output
PART 01
输入 xInput x
横坐标是每个样本给模型的数值。The horizontal coordinate is the value given to the model.
PART 02
权重 wWeight w
它放大、缩小或反转输入对输出的影响。It amplifies, shrinks, or reverses the input's effect.
PART 03
截距 bBias b
即使输入为 0,它仍给预测一个起点。It gives the prediction a starting level even when input is zero.
PART 04
误差棒Error bar
它显示当前参数预测离样本答案有多远。It shows how far the current prediction is from the observed answer.
04最小机制:每个样本都使用同一组参数Minimal Mechanism: Every Example Uses the Same Parameters
ŷ = wx + b
ŷi = w xi + b
上方六个样本共用同一 w 与 b。因此只动一个参数,六个 ŷi 和误差 |yi − ŷi| 都会改变。All six examples share one w and b. Moving either parameter changes every ŷi and error |yi − ŷi|.
拖动参数Move parameterw 或 b 改变w or b changes
重算预测Recompute outputs整条直线移动The whole line moves
误差同步变化Errors update每根误差棒重画Every error bar redraws
05边界实验:把权重方向调反Boundary Test: Reverse the Weight
主动制造失败Create a failure
让 w = −1,b = 1.4Set w = −1 and b = 1.4
样本整体向右上方走,负权重却让预测线向右下方走。观察误差棒怎样被同时拉长。The examples trend up to the right, while a negative weight sends the prediction down. Watch all error bars
lengthen together.
尚未执行。当前权重为正。Not run yet. The current weight is positive.
✗ 参数只是模型的容量数字。Parameters are merely a model-size number.
→ ✓ 每个参数通过计算具体改变输入输出关系。Each parameter concretely changes the input-output computation.
✗ 权重越大,模型一定越好。A larger weight always makes a better model.
→ ✓ 好坏取决于参数组合能否降低目标误差。Quality depends on whether the combination reduces target error.
✗ 一个参数只影响一个样本。One parameter affects only one example.
→ ✓ 共享参数会同时作用于所有经过该计算的样本。A shared parameter affects every example passing through that computation.
06 · 一句话带走06 · One line to keep
参数与权重是训练会调整、共同决定输入输出关系的数值;拖动 w 或
b,就能检验预测线与所有样本误差会同步改变。Parameters and weights are adjustable values that jointly determine the input-output mapping. Move w or b to
verify that the prediction line and every example error change together.