Loss Functions and Optimization

potato·2021년 7월 19일
0

아이펠

목록 보기
7/8
고양이자동차개구리
cat3.21.32.2
car5.14.92.5
flog-1.72.0-3.1
Losses2.9012.9

SVM loss

Li=jyiimax(0,sjsyi+1)L_i \displaystyle \displaystyle= \sum_{j\ne{y_i}}imax(0, s_j - s_{y_i} + 1 )
  • 고양이
    = max(0, 5.1 - 3.2 + 1) + max(0, -1.7 - 3.2 + 1)
    = max(0, 2.9) + 0
    = 2.9

  • 자동차
    = max(0, 1.3 - 4.9 + 1) + max(0,2.0 - 4.9 + 1 )
    = max(0, -2.6) + max(0, -1.9)
    = 0 + 0
    = 0

  • 개구리
    = max(0, 2.2 - (-3.1) + 1) + max(0, 2.5 - (-3.1) + 1 )
    = max(0, 6.3) + max(0, 6.6)
    = 6.3 + 6.6
    = 12.9

L=1Nj=1NLiL = {1 \over N}\sum_{j=1}^NL_i

L = (2.9 + 0 + 12.9) / 3
= 5.27

https://www.slideshare.net/slideshow/embed_code/key/uikyji64aEyeE2
http://vision.stanford.edu/teaching/cs231n-demos/linear-classify/
https://wewinserv.tistory.com/74
http://aikorea.org/cs231n/linear-classify/#svmvssoftmax
https://www.quora.com/What-is-the-difference-between-softmax-and-svm-classifiers

profile
안녕하세요~

0개의 댓글