訓練的三個問題Three questions behind training

IDL115 · CH03 · KP01 · 1/44
先決定模型、定義錯誤,再用優化降低錯誤。 / Choose a model, measure mistakes, then optimize.

模型家族Hypothesis class

決定可選的模型,例如多層神經網路。 / Define the set of candidate models.

損失函數Loss function

把預測錯誤轉成可比較的分數。 / Turn prediction errors into a numerical score.

L(w)=1n∑i=1nℓ(hw(xi),yi)\mathcal L(\boldsymbol w)=\frac1n\sum_{i=1}^n\ell(h_{\boldsymbol w}(x_i),y_i)

搜尋參數Optimization

反向傳播提供梯度;優化器使用梯度更新權重。 / Backprop computes gradients; the optimizer updates weights.

w∗=arg⁡min⁡wL(w)\boldsymbol w^*=\arg\min_{\boldsymbol w}\mathcal L(\boldsymbol w)