근거로 ‘최적의 인생’을 탐색하듯, 신경망도 ‘하나의 지표’를 기준으로 최적의 매개변수 값을 탐
색합니다. 신경망 학습에서 사용하는 지표는
손실 함수
loss
function
*
라고 합니다. 이 손실 함수는 임
의의 함수를 사용할 수도 있지만 일반적으로는 평균 제곱 오차와 교차 엔트로피 오차를 사용합
니다.
WARNING
_ 손실 함수는 신경망 성능의 ‘나쁨’을 나타내는 지표로, 현재의 신경망이 훈련 데이터를 얼마
나 잘 처리하지 ‘못’하느냐를 나타냅니다. ‘성능 나쁨’을 지표로 한다니 무언가 부자연스럽다고 생각할지 모르
지만, 손실 함수에 마이너스만 곱하면 ‘얼마나 나쁘지 않나’, 즉 ‘얼마나 좋으냐’라는 지표로 변신하죠. 또, ‘나
쁨을 최소로 하는 것’과 ‘좋음을 최대로 하는 것’은 결국 같은 것이니까, 성능의 ‘나쁨’과 ‘좋음’ 중 어느 쪽을 지
표로 삼아도 본질적으로 수행하는 일은 다르지 않습니다.
4.2.1
평균 제곱 오차
가장 많이 쓰이는 손실 함수는
평균 제곱 오차
mean
squared
error
,
MSE
입니다. 평균 제곱 오차는 수식으
로는 다음과 같습니다.
yt
()
2
1
k
kk
2
E
=-
|
[식 4.1]
여기서
y
k
는 신경망의 출력(신경망이 추정한 값),
t
k
는 정답 레이블,
k
는 데이터의 차원 수를
나타냅니다. 이를테면 ...
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.