SlideShare a Scribd company logo
1 of 61
Download to read offline
활성화 함수
유쉘
산업시스템 공학과를 졸업하고
딥러닝에 대해 공부하고 있습니다
yushell0417@gmail.com
3
2층 신경망은 오래전에 생각해 낸 방법입니다.
4
최근 몇 년 전까지
잘 사용하지 않았던 이유는 무엇일까요?
5
3가지의 문제 점이 있습니다.
6
3가지의 문제 점이 있습니다.
GPU의 성능..
7
3가지의 문제 점이 있습니다.
학습이 잘 되지 않는 언더피팅..
1080 Ti 사용
8
3가지의 문제 점이 있습니다.
학습 데이터에 너무 적합(fit)하게 되는 오버피팅..
활성화 함수 설정
9
3가지의 문제 점이 있습니다.
가중치 정규화
10
앞의 문제점을 아래의 방법으로 해결하거나
조정이 가능 합니다.
가중치 정규화
활성화 함수 설정
1080 Ti 사용
11
GPU의 성능 향상 전까지는
신경망의 처리 속도가 느렸지만..
12
최근 GPU의 성능 향상으로
신경망의 처리 속도가 고속화 되었습니다.
13
학습이 잘 되지 않는 언더피팅 문제..
14
왜 이런 현상이 일어날까요?
15
활성화 함수 때문입니다.
16
활성화 함수란 입력값이 어떠한 기준을 경계로
출력이 바뀌는 것입니다.
17
기준을 어떻게 설정하는지에 따라
새로운 신경망을 경험하게 됩니다.
18
W1
W2
W3
W4
x1
x2
x3
x4
f(x,W)
지금까지 말씀드린 바에 따르면 우리는 이미지 입력(x1 ~ x4)에 가중치
를 부여하여 점수를 출력(output)하는 구조를 구성하였습니다.
오차함수
점수
19
사실은! f(x,W)에서 계산 된 점수는..
20
활성화 함수를 거치게 됩니다.
21
다시 Back Propagation 학습 과정을 살펴보면
22
x1
x2
오차함수
loss!!
기울기
아래의 신경망에
23
x1
x2
오차함수
loss!!
기울기
활성화 함수가 추가 됩니다.
24
그렇다면 활성화 함수는
어떠한 것이 있을까요?
25
전통적으로 신경망을 연구하던 많은 사람들은
Sigmoid 라는 함수를 사용했습니다.
26
Sigmoid 함수를 한번 살펴보겠습니다.
27
시그모이드 함수 입니다.0.5
1.0
-10 10
28
sigmoid 함수는 넓은 범위의 숫자를
0 과 1 사이 숫자로 출력 값을 바꿔 줍니다.
0.5
1.0
-10 10
29
입력 값을 0과 1 사이의 확률과 같이
일정 범위 내 위치하도록 만들어
주었기 때문에 많이 사용되었습니다.
30
하지만 지금은 더 이상
사용하지 않는 함수입니다.
31
어떠한 이유로 사용하지 않는
함수가 되었는지
이유를 알아보도록 하겠습니다.
32
시그모이드 함수는 문제점이
3가지가 있습니다.
0.5
1.0
-10 10
33
1. 기울기가 사라지는 현상
2. 자연로그 사용으로 인한 수렴속도 저하
3. Non zero-centered 으로 인한 수렴속도 저하
0.5
1.0
-10 10
34
기울기가 사라지는 현상에
대해 알아보겠습니다.
35
0.5
1.0
-10 10
sigmoid 함수는 기울기를 가지기 때문에
gradient descent 를 가지고 학습하기 좋습니다.
36
하지만!!
37
0.5
1.0
-10 10
x 값이 매우 커지거나 작아지면 기울기 값이 0 을 가지기 때문에
가중치 학습 시 기울기가 사라지는 현상이 나타납니다.
38
무슨 말인지 이해가 잘 안되시나요?
이 현상을 제가 좋아하는
아이돌 그룹이 보여주고 있습니다.
한번 보실까요?
40
그렇기 때문에 최적의 가중치로 수렴하는
시간이 느려지게 됩니다.
41
Non zero-centered 으로 인한
수렴속도 저하에 대해 알아 보겠습니다.
42
0.5
1.0
-10 10
sigmoid 함수는 보시다시피 y 값은
모든 것이 0 이상이기 때문에 0을 중심이 아닙니다.
43
그 결과는 최적의 loss를 찾아내는 과정이
느려진다는 것 입니다.
44
그 이유는 무엇일까요?
45
처음의 기울기는
양수와 음수로 나타나게 되는데
46
x1
x2
기울기
처음 기울기가 양수인 경우
양수양수
처음 기울기가 양수이면
가중치에 양수만큼 한번 학습!!
47
x1
x2
기울기
음수음수
처음 기울기가 음수인 경우
처음 기울기가 음수이면
가중치에 음수만큼 한번 학습!!
수렴속도
good
수렴속도
good
48
최적의 가중치
가중치1
가중치2
그래서 가중치 그래프를 보면!!
: 업데이트 되는 과정!!
최적의 가중치까지 지그재그로
업데이트 하고 있습니다.
49
그렇기 때문에 2사분면과 4 사분면은
최적의 가중치로 수렴하는
시간이 느려지게 됩니다.
50
이런 이유로 sigmoid 함수는
거의 사용되지 않는
그런 활성화 함수라고 생각하시면 됩니다.
51
Sigmoid 함수의 단점은
1. 기울기가 사라져 버린다.
2. 수렴 속도가 늦어진다.
두개의 이유입니다.
52
두가지의 단점을 개선한
함수를 소개 하겠습니다.
53
0
10
5 ReLU 함수 입니다.
54
0
10
5
x 가 양수인 지점에서는
기울기가 0이 되는 지점이
발생하지 않습니다.
기울기가 사라지는 현상을 사라지게한 방법
55
하지만 ReLU도 단점이 있습니다.
56
0
10
5
x 가 0 보다 작아지면 기울기가
0이 되므로 기울기가 사라지는
현상이 발생합니다.
57
그래서 위의 단점을 보안한
함수들이 생겼습니다.
58
0
10
5
Leaky ReLU 함수
0
10
5
Parametric ReLU 함수
두개 함수의 공통점은 무엇일까요?
59
x 가 0 보다 작은 경우에도
기울기가 0으로 나타나는 것이 아니라
기울기를 가지는 형태로 나타납니다.
60
학습이 잘 되지 않는 언더피팅 문제를
해결하기 위한
활성화 함수들을 살펴보았습니다.
감사합니다

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

[유쉘] 4.활성화 함수