Skip to Content
fastai와 파이토치가 만나 꽃피운 딥러닝
book

fastai와 파이토치가 만나 꽃피운 딥러닝

by 박찬성, 김지은, 제러미 하워드, 실뱅 거거
August 2021
Beginner to intermediate
720 pages
15h 32m
Korean
Hanbit Media, Inc.
Content preview from fastai와 파이토치가 만나 꽃피운 딥러닝
343
8
협업 필터링 깊게 알아보기
즉 모델이 높은 값의 파라미터를 학습하게 내버려 두면, 변화가 매우 심하며 너무 복잡한 함수
로 학습용 데이터셋의 모든 데이터에 적합되게 됩니다. 결국 과적합으로 이어지겠죠.
가중치가 너무 커지지 않도록 제한하는 일은 모델의 학습을 방해하지만, 일반화가 더 잘 되는
상태를 만들어냅니다. 잠시 이론으로 돌아가서, 가중치 감쇠 (또는
wd
)는 손실에 더한 제곱의
합을 제어하는 파라미터입니다(다음 코드에서
parameters
는 모델의 모든 파라미터를 표현하
는 단일 텐서라고 가정합니다 ).
loss_with_wd = loss + wd * (parameters**2).sum()
그러나 현실적으로 수많은 파라미터의 모든 합을 구하고 손실에 더하는 일은 매우 비효율적입
니다 (수적으로 불안정할 수도 있습니다 ). 고등 수학을 떠올려보면,
p
에 대한
p
**
2
의 미분은
2
*
p
이므로 손실에 그렇게나 큰 합을 더하는 일은 다음과 같습니다.
parameters.grad += wd * 2 * parameters
또한
wd
는 우리가 선택할 수 있는 값이므로, 두 배 크게 만들면
*
2
도 필요 없습니다.
fastai
서 가중치 감쇠를 사용하려면
fit
또는
fit
_
one
_
cycle
메서드 호출 시
wd
인자를 사용하면
됩니다.
344
2
fastai ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’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
QuotationMarkI 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
QuotationMarkI’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
QuotationMarkI'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.
Mark W.
Embedded Software Engineer

You might also like

AI를 위한 필수 수학

AI를 위한 필수 수학

할라 넬슨
러닝 타입스크립트

러닝 타입스크립트

조시 골드버그
GPT-4를 활용한 인공지능 앱 개발

GPT-4를 활용한 인공지능 앱 개발

올리비에 케일린, 마리 알리스 블레트

Publisher Resources

ISBN: 9791162244630