其中 $ g $ 和 $ f $ 是激活函數,$ \mathbf{W}_1, \mathbf{W}_2 $ 是權重矩陣,$ \mathbf{b}_1, \mathbf{b}_2 $ 是偏置向量。隱藏層使網絡能夠學習單個感知機無法捕捉的非線性關係。