Deep Learning: Difference between revisions

No edit summary
Line 16: Line 16:
<math>l(f_W(x), y) = \frac{1}{2}\Vert f_W(x)-y \Vert^2</math>
<math>l(f_W(x), y) = \frac{1}{2}\Vert f_W(x)-y \Vert^2</math>


For classification, can use hinge-loss:
For 2-way classification, can use hinge-loss:
<math>l(f_W(x), y) = \max(0, 1-yf_W(x))</math>
<math>l(f_W(x), y) = \max(0, 1-yf_W(x))</math>


For multi-way classification, can use cross-entropy loss: 
<math>g(z)=\frac{1}{1+e^{-z}}</math> 
<math>-\sum_{i=1}^{N}\left[y_i\log(y(f_W(x)) + (1-y_i)\log(1-g(f_W(x))\right]</math>


==Misc==
==Misc==