Back to tree

🎛 权重与偏置:两个最忙的配角🎛 Weights & Biases: the Two Busiest Bit-Parts

上一片里,门卫把分数 z 打理得服服帖帖。可 z 本身是谁算出来的?片场里站着两位最忙的配角——每条线、每个神经元都离不开它们。 Last leaf, the gatekeeper tidied up the score z. But who actually computes z? Two busiest bit-parts stand behind every wire and every neuron.

第 1 步:两位配角登场Step 1: Meet the two bit-parts

先认识它们——一个管音量,一个管基础心情。Say hello — one turns the volume, one sets the starting mood.

权重是音量旋钮,偏置是基础心情
糖卡和盐卡各自过一道音量旋钮:旋钮把信号拧大或拧小,这就是权重 w。两路信号汇进小机器人,再加上一点点「保底分」——偏置 b(它的基础心情),最后合成得分 z。写成一个式子:z = w₁·糖 + w₂·盐 + b。 The sugar card and the salt card each pass through a volume knob that dials the signal up or down — that's a weight w. The signals merge into the little robot, and a pinch of "starting mood" — the bias b — is added on top. Together they make the score z: z = w₁·sugar + w₂·salt + b.

那你可能要问:拧这两个旋钮,到底会改变什么?You might ask: what do these two knobs actually change?

第 2 步:一个管倾斜,一个管高低Step 2: One tilts, one shifts

权重调倾斜,偏置调高低
把数据画成散点,像一座往上爬的小山坡。权重 w 决定直线的倾斜:w 变大,线变陡;偏置 b 决定整条线的高低:b 变大,线整体上移。只调这两个数,让线穿过点群中间——这一步就叫「拟合」。 Plot the data as dots and it looks like a little hill climbing up. The weight w sets the tilt: bigger w, steeper line. The bias b sets the height: bigger b lifts the whole line. Tune just these two numbers until the line threads through the cloud — that step is called "fitting".

会调一条线只是热身——真实网络里,这样的配角有多少个?One line is just a warm-up — how many of these bit-parts live in a real network?

第 3 步:真实网络里,它们无处不在Step 3: Everywhere in a real network

每条连线一个权重,每个神经元一个偏置
每条连线都有自己的权重(就像线上的小旋钮),每个神经元都带自己的偏置(脚下的小基座)。一个几百万参数的网络,主角就是它们;训练做的唯一一件事,就是一点点微调这几百万到几十亿个数字,让整个班底的配合越来越好。 Every connection owns a weight (the little knob on the line), and every neuron carries a bias (the base under its feet). A network with millions of parameters is mostly these two — and training does exactly one thing: gently tweak those millions-to-billions of numbers until the whole cast performs better.

🎮 你来当调线师(1 分钟)🎮 Your turn: line fitter (1 minute)

道理讲完了。4 颗靶点等着你,两个滑块:一个管倾斜(权重),一个管高低(偏置)。看看几秒能通关。Theory done. Four targets await, two sliders: one tilts (weight), one shifts (bias). See how fast you can clear it.

一句话记住它:权重管「倾斜」(乘法),偏置管「高低」(加法);网络里它们以百万计,训练就是微调它们。 Remember it in one line: weights set the tilt (a multiply), biases set the height (an add); a network holds millions of them, and training just tweaks them.
权重 = 每条信号线自己的音量旋钮(乘法)Weight = each signal line's own volume knob (a multiply) 偏置 = 每个神经元自己的保底分(加法):z = w·x + bBias = each neuron's own head start (an add): z = w·x + b 训练 = 微调这几百万到几十亿个数字,没有别的Training = tweaking those millions-to-billions of numbers — nothing else

← 浏览全部 302 个知识点← Browse all 302 topics

内容参考 OpenStax 等公开教材,多来源核对 · AI 生成、人工审核 · 发现错误欢迎指正,帮这片叶子长得更好。 Based on OpenStax and other open textbooks, cross-checked across sources · AI-generated, human-reviewed · Spotted a mistake? Tell us — help this leaf grow.