러나 시험 데이터에 대해서는 큰 차이를 보입니다. 이처럼 정확도가 크게 벌어지는 것은 훈련
데이터에만 적응
fitting
해버린 결과입니다. 훈련 때 사용하지 않은 범용 데이터(시험 데이터)에
는 제대로 대응하지 못하는 것을 이 그래프에서 확인할 수 있습니다.
6.4.2
가중치 감소
오버피팅 억제용으로 예로부터 많이 이용해온 방법 중
가중치 감소
weight
decay
라는 것이 있습니다.
이는 학습 과정에서 큰 가중치에 대해서는 그에 상응하는 큰 페널티를 부과하여 오버피팅을 억
제하는 방법입니다. 원래 오버피팅은 가중치 매개변수의 값이 커서 발생하는 경우가 많기 때문
이죠.
자, 복습해봅시다. 신경망 학습의 목적은 손실 함수의 값을 줄이는 것입니다. 이때, 예를 들
어 가중치의 제곱 법칙(
L2
법칙)을 손실 함수에 더합니다. 그러면 가중치가 커지는 것을 억
제할 수 있죠. 가중치를
W
라 하면
L2
법칙에 따른 가중치 감소는 이 되고, 이 을
손실 함수에 더합니다. 여기에서
λ
람다
는 정규화의 세기를 조절하는 하이퍼파라미터입니다.
λ
를
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.