神经网络的基本元素
- 权重 (w₁, w₂, w₃, ...) :每个输入都乘以相应的权重。这些权重是模型在训练过程中学习到的参数。
- 偏置 (b) :这是一个额外的参数,加到加权输入上以调整激活函数。它有助于模型做出更好的预测。
- 求和和激活函数 :输入的加权和加上偏置后,通过一个激活函数 (f)。这个函数决定了神经元的输出。
- 输出 (hᵥ,ₓ(x)) :这是神经元在应用激活函数后的最终输出。
数学表示如下:
<span class="katex"><span class="katex-mathml">hw,b(x)=f(WTx+b)<span class="katex-html"><span class="base"><span class="strut"><span class="mord"><span class="mord mathnormal">h<span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist"><span class="pstrut"><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">w<span class="mpunct mtight">,<span class="mord mathnormal mtight">b<span class="vlist-s"><span class="vlist-r"><span class="vlist"><span class="mopen">(<span class="mord mathnormal">x<span class="mclose">)<span class="mspace"><span class="mrel">=<span class="mspace"><span class="base"><span class="strut"><span class="mord mathnormal">f<span class="mopen">(<span class="mord"><span class="mord mathnormal">W<span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist"><span class="pstrut"><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">T<span class="mord mathnormal">x<span class="mspace"><span class="mbin">+<span class="mspace"><span class="base"><span class="strut"><span class="mord mathnormal">b<span class="mclose">)
这个方程式表示,输出 <span class="katex"><span class="katex-mathml">hw,b(x)<span class="katex-html"><span class="base"><span class="strut"><span class="mord"><span class="mord mathnormal">h<span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist"><span class="pstrut"><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">w<span class="mpunct mtight">,<span class="mord mathnormal mtight">b<span class="vlist-s"><span class="vlist-r"><span class="vlist"><span class="mopen">(<span class="mord mathnormal">x<span class="mclose">)&nbsp;是加权输入的和&nbsp;<span class="math math-inline"><span class="katex"><span class="katex-mathml">WTx<span class="katex-html"><span class="base"><span class="strut"><span class="mord"><span class="mord mathnormal">W<span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist"><span class="pstrut"><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">T<span class="mord mathnormal">x&nbsp;加上偏置&nbsp;<span class="math math-inline"><span class="katex"><span class="katex-mathml">b<span class="katex-html"><span class="base"><span class="strut"><span class="mord mathnormal">b&nbsp;后通过激活函数&nbsp;<span class="math math-inline"><span class="katex"><span class="katex-mathml">f<span class="katex-html"><span class="base"><span class="strut"><span class="mord mathnormal">f&nbsp;得到的结果。
图片底部的中文文字是对上述解释的翻译。
激活函数是非线性的:防止多层神经网络坍缩成单层