Cross-Entropy loss(크로스-엔트로피 로스)

2023. 6. 10. 22:56공부한 내용/머신러닝 이론

1. Task

1) Multi-Class Clasification

: 주어진 입력값이 오로지 1개의 class에만 속함

-target (y)는 one-hot vector로 주어짐(positive class에만 1, 나머지 negative class는 전부 0)

 

2) Multi-Label Classification

: 주어진 입력값이 1개 이상의 class에 속할 수 있음

-target (y)는 one-hot vector로 주어지나 1개 이상의 positive class와 negative class를 가질 수 있음

 

Multi-Class vs. Multi-Label

 

 

2. Output Activation Functions

1) Sigmoid (=logistic function)

-벡터가 입력되었을 시 각 요소들을 (0, 1) 사이의 값으로 반환

-주로 이진분류 시 사용

 

2) Softmax

-벡터가 입력되었을 시 각 요소들을 (0, 1) 사이의 값으로 반환

-변환된 요소들의 값을 전부 합하면 1 => 각 class에 속할 비율로도 해석 가능

-주로 다중분류에 사용

 

 

3. Losses

1) Cross-Entropy Loss

-ti, si: 실제 값, 각 클래스에 대한 CNN 점수

-주로 Sigmoid/Softmax와 같은 활성화함수가 적용된 후에 CE Loss 계산

 

2) Categorical Cross-Entropy Loss

-Softmax activation function + Cross-Entropy Loss

 

 

*출처: Understanding Categorical Cross-Entropy Loss, Binary Cross-Entropy Loss, Softmax Loss, Logistic Loss, Focal Loss and all those confusing names (gombru.github.io)

 

Understanding Categorical Cross-Entropy Loss, Binary Cross-Entropy Loss, Softmax Loss, Logistic Loss, Focal Loss and all those c

People like to use cool names which are often confusing. When I started playing with CNN beyond single label classification, I got confused with the different names and formulations people write in their papers, and even with the loss layer names of the de

gombru.github.io