소프트맥스는 시그모이드의 다중 범주 버전쯤으로 볼 수 있습니다. 범주가 둘 이상이고 각 범
주 확률의 합이
1
이 되어야 하는 상황에서는 언제나 사용할 수 있습니다. 그리고 단지 두 범주
만 있을 때도 일관성을 유지할 목적으로 많이 사용합니다. 모든 활성값이
0
~
1
사이이며 합하
면
1
이 되는 특성이 있는 함수를 직접 만들 수도 있습니다. 하지만 부드럽고 대칭적인 모양의
시그모이드 같은 함수를 만들기는 쉽지 않습니다. 또한 소프트맥스는 다음 절에서 다룰 손실
함수와도 함께 잘 작동합니다.
출력 활성이 세 개인 곰 분류 모델에 곰 이미지를 한 장 입력하면, [그림
5
-
3
]처럼 소프트맥스
가 계산됩니다.
그림
5-3
곰 분류기에 대한 소프트맥스의 예
이 함수가 실제로 하는 일은 무엇일까요? 지수 함수로 모든 숫자를 양수화하고 이들을 합한 값
으로 각 숫자를 나누면, 더했을 때
1
이 되는 숫자가 여럿 생깁니다. 지수 함수는 여러 활성값
중 하나가 다른 값보다 조금만 크더라도 그 값을 증폭시키는 좋은 속성이 있습니다. 증폭된다
는 말은 값이
1
에 가까워진다는 의미죠.
소프트맥스 함수가
하려는 일은 범주들 가운데 하나를 고르는 것입니다. 따라서 각 입 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.