Skip to Content
핸즈온 머신러닝(2판): 사이킷런, 케라스, 텐서플로 2를 활용한 머신러닝, 딥러닝 완벽 실무
book

핸즈온 머신러닝(2판): 사이킷런, 케라스, 텐서플로 2를 활용한 머신러닝, 딥러닝 완벽 실무

by 박해선, 오렐리앙 제롱
May 2020
Beginner to intermediate
952 pages
24h 11m
Korean
Hanbit Media, Inc.
Content preview from 핸즈온 머신러닝(2판): 사이킷런, 케라스, 텐서플로 2를 활용한 머신러닝, 딥러닝 완벽 실무
471
12
텐서플로를 사용한 사용자 정의 모델과 훈련
텐서, 연산, 변수,
다양한 데이터
구조를 알아보았으므로 모델과 훈련 알고리즘을 커스터마이
징할 준비를 마쳤습니다!
12.3
사용자 정의 모델과 훈련 알고리즘
가장 간단하고 많이 사용하는 사용자 정의 손실 함수를 만들어봅시다.
12.3.1
사용자 정의 손실 함수
회귀 모델을 훈련하는 데 훈련 세트에 잡음 데이터가 조금 있다고 가정해봅시다. 물론 이상치
를 제거하거나 고쳐서 데이터셋을 수정해볼 수 있지만, 비효율적이고 잡음 데이터가 여전히 남
아 있을 것입니다. 이럴 때 어떤 손실 함수를 사용해야 할까요? 평균 제곱 오차는 큰 오차에 너
무 과한 벌칙을 가하기 때문에 정확하지 않은 모델이 만들어질 것입니다. 평균 절댓값 오차는
이상치에 관대해서 훈련이 수렴되기까지 시간이 걸립니다. 그리고 모델이 정밀하게 훈련되지
않을 것입니다. 이런 경우 평균 제곱 오차대신 후버
Huber
손실 (
10
장 참조 )을 사용하면 좋습니
다. 후버 손실은 아직 공식 케라스
API
에서 지원하지 않습니다.
tf
.
keras
에서는 지원하기는 하
지만 (
keras
.
losses
.
Huber
클래스를 사용하면 됩니다 ), 마치 없는 것처럼 생각하고 구현해
보겠습니다. 누워서 떡 먹기처럼 아주 쉽습니다! 레이블과 예측을 매개변수로 받는 함수를 만
들고 ...
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

만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술

만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술

한민주, 양찬석, 탈 아터

Publisher Resources

ISBN: 9791162242964