SlideShare a Scribd company logo
1 of 34
Download to read offline
Deep Feedforward Networks
6.4 Architecture Design
6.5 Back-propagation
6.4 Architecture Design
신경망의 구조도 설계
1. 신경망의 층 개수
2. 층들의 상호 연결 방식
3. 각 층의 계산 단위 개수
Architecture는 unit개수나 unit들의 연결 방
식 등을 포괄하는, 신경망의 전반적인 구조
대부분의 신경망 아키텍처는 다수의 층을,
각 층이 그 이전 층의 결과를 입력으로 받
는 함수로서 작용하는 형태의 사슬 구조로
조직화된다.
이러한 사슬 기반 아키텍처에서 신경망의
구조에 관한 주된 고려사항은 신경망의 깊
이와 각 층의 너비를 선택하는 것이다.
대부분은 층(layer)이라고 부르는 단위들의
묶음으로 조직화 된다.
http://www.asimovinstitute.org/neural-network-zoo/
RNN / LSTM / RBM / DBN ….
아시모프 인스튜티트(The Asimov Institute)
6.4 Architecture Design
6.4 Architecture Design
신경망의 구조도 설계
1. 신경망의 층 개수
2. 층들의 상호 연결 방식
3. 각 층의 계산 단위 개수
보편근사정리(Universal Approximation Theorem, UAT)
배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer
Perceptron)로 그 함수를 표현할 수 있음을 뜻한다.
현재 가장 많이 사용되는 딥러닝 모델
CNN
DBN
6.4 Architecture Design
6.4 Architecture Design
신경망의 구조도 설계
1. 신경망의 층 개수
2. 층들의 상호 연결 방식
3. 각 층의 계산 단위 개수
보편근사정리(Universal Approximation Theorem, UAT)
배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer
Perceptron)로 그 함수를 표현할 수 있음을 뜻한다.
6.4 Architecture Design
보편근사정리(Universal Approximation Theorem, UAT)
배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer
Perceptron)로 그 함수를 표현할 수 있음을 뜻한다.
y = 3sin(x)cos(x)(6x^2+3x^3+x)tan(x) 여러 개의 layer로 구현
하나의 layer로 구현
6.4 Architecture Design
보편근사정리(Universal Approximation Theorem, UAT)
배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer
Perceptron)로 그 함수를 표현할 수 있음을 뜻한다.
y = 3sin(x)cos(x)(6x^2+3x^3+x)tan(x)
보편근사정리에 따르면, 주어진 함수
를 우리가 원하는 정확도로 근사하기
에 충분한 크기의 신경망이 존재한다.
그러나 그러한 신경망이 얼마나 큰지
를 정리가 말해 주지는 않는다.
최악의 경우 필요한 hidden layer 개수
는 지수적(거듭제곱 규모)일 수 있다.
깊이의 효과. 신경망은 깊을수록 더 잘 일반화 된다.
[Goodfellow et al. 2014d]
Test set 정확도는 깊이의 증가에 따라 일관되게 증가한다.
6.4 Architecture Design
convolution 신경망의 깊이를 증가하지 않고
매개변수만 늘리는 것은
test set 정확도 향상에 효과적이지 못하다.
특히, 깊은 모형은 함수가 다수의 더 단순한 함수들을
조합한 형태이어야 한다는 믿음을 나타낸다.
6.4 Architecture Design
6.4 Architecture Design
6.4 Architecture Design
더 깊은 망이 학습 데이터 속에 존재
하는 대표적인 개념을 잘 추출할 수
있어 학습 결과가 좋아진다
그러나 망이 깊어질수록 파라미터의
수가 비례적으로 늘어나게 되어 학습
을 시키기가 어려워지는 단점이 있다.
6.4 Architecture Design
6.4 Architecture Design
더 깊은 망의 단점을 layer를 skip하면서 학습하도록 설계해서 극복했다
Fast net이라고도 불린다
매번 통과할 때 마다 거치는 layer의 구
성이 달라진다 >> 다양한 결과 도출
경로가 여러 개이긴 하지만, 특정한 경
로로 진입하면 경로에 포함된 모든
layer를 거쳐야 하기 때문에 다양한 결
과를 내지 못한다
6.5 Back-propagation and Other differentiation Algorithms
Back propagation
인공신경망의 원리
킬로미터를 마일로 변환해주는 기계 가정
마일 = 킬로미터 x c
실제사례 킬로미터 마일
1 0 0
2 100 62.137
C를 찾기 위해선??
오차 = 실제 값 – 계산 값
= 62.137 – 50
= 12.137
Back propagation
인공신경망의 원리
킬로미터를 마일로 변환해주는 기계 가정
마일 = 킬로미터 x c
실제사례 킬로미터 마일
1 0 0
2 100 62.137
C를 찾기 위해선??
오차 = 2.137
오차 = -7.863
직전 시도를 거울삼아 파라미터
를 조금씩 조정해 나간다
Back propagation
인공신경망의 원리
분류도 예측과 그다지 다르지 않다
직선은 미지의 곤충들을 측정 값(폭과 길이)에 기초해 분
류하는 용도로 사용한다.
Back propagation
인공신경망의 원리
분류도 예측과 그다지 다르지 않다
애벌레다!
Back propagation
인공신경망의 원리
분류자 학습시키기
Training data
Y = Ax
분할선이 직선이므로 임의의 방정식 가정
좋은 분류자는 아니다
A = 0.25로 랜덤하게 설정
Back propagation
인공신경망의 원리
분류자 학습시키기
Training data
Y = Ax
분할선이 직선이므로 임의의 방정식 가정
Y = 0.25 x 3.0 = 0.75
Training data 대입
오차 = 목표 값 – 실체 출력 값
E = 1.1 – 0.75 = 0.35
Back propagation
인공신경망의 원리
분류자 학습시키기
Y = Ax
T = (A +ΔA)x
E = 1.1 – 0.75 = 0.35
ΔA = E/ x = 0.35/ 3.0 = 0.1167
현재 0.25라는 값을 가지는 A를
0.1167만큼 업데이트 해야한다
Back propagation
인공신경망의 원리
분류자 학습시키기
이번에는 목표 t 를 2.9로 설정
마지막으로 학습한 Training data에 맞
춰진 업데이트 결과만 얻는다
업데이트의 정도를 조금씩 조정해야 한다
ΔA = E/ x = 2.5333/ 1.0 = 2.5333
즉 x = 1.0 일 때 이 함수는 목표 값
인 .2.9를 출력
새로운 A는
A + ΔA = 0.3667 + 2.5333 = 2.9로
업데이트
Back propagation
인공신경망의 원리
분류자 학습시키기
이번에는 목표 t 를 2.9로 설정
마지막으로 학습한 Training data에 맞
춰진 업데이트 결과만 얻는다
업데이트의 정도를 조금씩 조정해야 한다
ΔA = E/ x = 2.5333/ 1.0 = 2.5333
즉 x = 1.0 일 때 이 함수는 목표 값
인 .2.9를 출력
새로운 A는
A + ΔA = 0.3667 + 2.5333 = 2.9로
업데이트
L 을 Learning rate
이라고 부른다
Back propagation
인공신경망의 원리
분류자 학습시키기
X = 1.0이고 A=0.3083이므로
Y = 0.3083 x 1.0 = 0.3083
목표 값은 2.9이므로 오차는 2.9 – 0.3083 = 2.5914
두번째 학습 데이터 적용
ΔA = L(E/x) = 0.5 x (2.5914/1.0) = 1.2958
따라서 업데이트 된 A는 0.3083 + 1.2958 = 1.6042
비교적 간단한 기법인 학습률만 적용했을 뿐인
데 분할선에 매우 빠르게 도달!
Back propagation
인공신경망의 원리
2개의 layer와 2개의 뉴런만 존재하는 신경망의 예
2개의 입력 값 각각 1.0 , 0.5
W(1.1) = 0.9
W(1.2) = 0.2
W(2.1) = 0.3
W(2.2) = 0.8 로 가정
X = (1.0 x 0.9) + (0.5 x 0.3) = 0.9 + 0.15 = 1.05
X = (1.0 x 0.2) + (0.5 x 0.8) = 0.2 + 0.4 = 0.6
1.05
0.6
Back propagation
인공신경망의 원리
여러 개의 노드가 결과 값과 오차에 영향을 주는 경우에는
가중치를 어떻게 업데이트 해야 할까?
Back propagation
인공신경망의 원리
오차를 각각의 노드에 가중치 만큼 비례해 나누어 준다
그리고 그를 바탕으로 W를 업데이트 한다
이를 오차역전파라고 말한다
Back propagation
인공신경망의 원리
W11 = 2.0, W12 = 1.0
출력Layer의 오차E가 0.8
0.8 을 2/3, 1/3 으로 비례해서 이전 Layer
가중치에 전달한다.
각 각 0.32 , 0.48
인공신경망에서 학습이란 연결 노드의 가중치를 업데이트 하는 과정을 의미한다.
Back propagation
인공신경망의 원리
Back propagation
인공신경망의 원리
가중치의 계산
무차별 대입은 비용이 너무 크다
3개의 노드를 가지는 3개의 Layer로 이루
어진 신경망에는 총 18개의 가중치 존재
가중치 범위 -1~1 사이의 값이 1000개로
제한된다고 가정한다고 해도
총 18000가지 경우의 수를 테스트 해야한
다
500개 노드면 5억 가지 조합
하나의 조합 연산하는데 1초가 걸린다고
해도 16년이 걸림
Back propagation
인공신경망의 원리
경사 하강법
Back propagation
인공신경망의 원리
Vanishing gradient descent problem
Sigmoid나, tanh 등의 activation function들은 매우 비선형적인 방식
으로 그들의 input을 매우 작은 output range로 짓이겨 넣는다(squash)
해결은 ReLU

More Related Content

What's hot

Understanding deep learning requires rethinking generalization (2017) 2 2(2)
Understanding deep learning requires rethinking generalization (2017)    2 2(2)Understanding deep learning requires rethinking generalization (2017)    2 2(2)
Understanding deep learning requires rethinking generalization (2017) 2 2(2)정훈 서
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNet[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNetjdo
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Othersjdo
 
인공신경망
인공신경망인공신경망
인공신경망종열 현
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷jdo
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장Sunggon Song
 
One-Shot Learning
One-Shot LearningOne-Shot Learning
One-Shot LearningJisung Kim
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16jdo
 
Understanding deep learning requires rethinking generalization (2017) 1/2
Understanding deep learning requires rethinking generalization (2017) 1/2Understanding deep learning requires rethinking generalization (2017) 1/2
Understanding deep learning requires rethinking generalization (2017) 1/2정훈 서
 
Learning by association
Learning by associationLearning by association
Learning by association홍배 김
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)홍배 김
 
합성곱 신경망
합성곱 신경망합성곱 신경망
합성곱 신경망Sunggon Song
 
Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리SANG WON PARK
 
boosting 기법 이해 (bagging vs boosting)
boosting 기법 이해 (bagging vs boosting)boosting 기법 이해 (bagging vs boosting)
boosting 기법 이해 (bagging vs boosting)SANG WON PARK
 
텐서플로우로 배우는 딥러닝
텐서플로우로 배우는 딥러닝텐서플로우로 배우는 딥러닝
텐서플로우로 배우는 딥러닝찬웅 주
 
집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01
집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01
집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01Kwang Woo NAM
 

What's hot (20)

DL from scratch(4~5)
DL from scratch(4~5)DL from scratch(4~5)
DL from scratch(4~5)
 
Understanding deep learning requires rethinking generalization (2017) 2 2(2)
Understanding deep learning requires rethinking generalization (2017)    2 2(2)Understanding deep learning requires rethinking generalization (2017)    2 2(2)
Understanding deep learning requires rethinking generalization (2017) 2 2(2)
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNet[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNet
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 4 - ResNet
 
Dl from scratch(8)
Dl from scratch(8)Dl from scratch(8)
Dl from scratch(8)
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 5 - Others
 
DL from scratch(1~3)
DL from scratch(1~3)DL from scratch(1~3)
DL from scratch(1~3)
 
인공신경망
인공신경망인공신경망
인공신경망
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 1 - 알렉스넷
 
밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장밑바닥부터 시작하는딥러닝 8장
밑바닥부터 시작하는딥러닝 8장
 
One-Shot Learning
One-Shot LearningOne-Shot Learning
One-Shot Learning
 
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16
 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16 [컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16
[컴퓨터비전과 인공지능] 8. 합성곱 신경망 아키텍처 2 - ZFNet, VGG-16
 
Understanding deep learning requires rethinking generalization (2017) 1/2
Understanding deep learning requires rethinking generalization (2017) 1/2Understanding deep learning requires rethinking generalization (2017) 1/2
Understanding deep learning requires rethinking generalization (2017) 1/2
 
Learning by association
Learning by associationLearning by association
Learning by association
 
Dl from scratch(7)
Dl from scratch(7)Dl from scratch(7)
Dl from scratch(7)
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)
 
합성곱 신경망
합성곱 신경망합성곱 신경망
합성곱 신경망
 
Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리Coursera Machine Learning (by Andrew Ng)_강의정리
Coursera Machine Learning (by Andrew Ng)_강의정리
 
boosting 기법 이해 (bagging vs boosting)
boosting 기법 이해 (bagging vs boosting)boosting 기법 이해 (bagging vs boosting)
boosting 기법 이해 (bagging vs boosting)
 
텐서플로우로 배우는 딥러닝
텐서플로우로 배우는 딥러닝텐서플로우로 배우는 딥러닝
텐서플로우로 배우는 딥러닝
 
집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01
집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01
집단지성 프로그래밍 07-고급 분류 기법-커널 기법과 svm-01
 

Similar to Chapter 6 Deep feedforward networks - 2

Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Mad Scientists
 
03.12 cnn backpropagation
03.12 cnn backpropagation03.12 cnn backpropagation
03.12 cnn backpropagationDea-hwan Ki
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks ISang Jun Lee
 
Image classification
Image classificationImage classification
Image classification종현 김
 
3.unsupervised learing
3.unsupervised learing3.unsupervised learing
3.unsupervised learingHaesun Park
 
Deep Learning & Convolutional Neural Network
Deep Learning & Convolutional Neural NetworkDeep Learning & Convolutional Neural Network
Deep Learning & Convolutional Neural Networkagdatalab
 
PR12 Season3 Weight Agnostic Neural Networks
PR12 Season3 Weight Agnostic Neural NetworksPR12 Season3 Weight Agnostic Neural Networks
PR12 Season3 Weight Agnostic Neural NetworksKyunghoon Jung
 
3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)Haesun Park
 
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic용진 조
 
Image net classification with deep convolutional neural networks
Image net classification with deep convolutional neural networks Image net classification with deep convolutional neural networks
Image net classification with deep convolutional neural networks Korea, Sejong University.
 
Paper Reading : Learning to compose neural networks for question answering
Paper Reading : Learning to compose neural networks for question answeringPaper Reading : Learning to compose neural networks for question answering
Paper Reading : Learning to compose neural networks for question answeringSean Park
 
[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networks[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networksKorea, Sejong University.
 
Ch.5 Deep Learning
Ch.5 Deep LearningCh.5 Deep Learning
Ch.5 Deep LearningPartPrime
 
텐서플로우-기본신경망구현
텐서플로우-기본신경망구현텐서플로우-기본신경망구현
텐서플로우-기본신경망구현jdo
 
Cop 2주차발표 복사본
Cop 2주차발표   복사본Cop 2주차발표   복사본
Cop 2주차발표 복사본jungyounjung1
 
Neural network의 변천사 이태영
Neural network의 변천사 이태영Neural network의 변천사 이태영
Neural network의 변천사 이태영Tae Young Lee
 
[신경망기초] 심층신경망개요
[신경망기초] 심층신경망개요[신경망기초] 심층신경망개요
[신경망기초] 심층신경망개요jaypi Ko
 
Learning how to explain neural networks: PatternNet and PatternAttribution
Learning how to explain neural networks: PatternNet and PatternAttributionLearning how to explain neural networks: PatternNet and PatternAttribution
Learning how to explain neural networks: PatternNet and PatternAttributionGyubin Son
 

Similar to Chapter 6 Deep feedforward networks - 2 (20)

Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
Face Feature Recognition System with Deep Belief Networks, for Korean/KIISE T...
 
03.12 cnn backpropagation
03.12 cnn backpropagation03.12 cnn backpropagation
03.12 cnn backpropagation
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks I
 
Image classification
Image classificationImage classification
Image classification
 
HistoryOfCNN
HistoryOfCNNHistoryOfCNN
HistoryOfCNN
 
3.unsupervised learing
3.unsupervised learing3.unsupervised learing
3.unsupervised learing
 
Deep Learning & Convolutional Neural Network
Deep Learning & Convolutional Neural NetworkDeep Learning & Convolutional Neural Network
Deep Learning & Convolutional Neural Network
 
PR12 Season3 Weight Agnostic Neural Networks
PR12 Season3 Weight Agnostic Neural NetworksPR12 Season3 Weight Agnostic Neural Networks
PR12 Season3 Weight Agnostic Neural Networks
 
3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)3.unsupervised learing(epoch#2)
3.unsupervised learing(epoch#2)
 
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
캐빈머피 머신러닝 Kevin Murphy Machine Learning Statistic
 
Image net classification with deep convolutional neural networks
Image net classification with deep convolutional neural networks Image net classification with deep convolutional neural networks
Image net classification with deep convolutional neural networks
 
Paper Reading : Learning to compose neural networks for question answering
Paper Reading : Learning to compose neural networks for question answeringPaper Reading : Learning to compose neural networks for question answering
Paper Reading : Learning to compose neural networks for question answering
 
[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networks[Paper Review] Visualizing and understanding convolutional networks
[Paper Review] Visualizing and understanding convolutional networks
 
Ch.5 Deep Learning
Ch.5 Deep LearningCh.5 Deep Learning
Ch.5 Deep Learning
 
텐서플로우-기본신경망구현
텐서플로우-기본신경망구현텐서플로우-기본신경망구현
텐서플로우-기본신경망구현
 
Cop 2주차발표 복사본
Cop 2주차발표   복사본Cop 2주차발표   복사본
Cop 2주차발표 복사본
 
Convolutional rnn
Convolutional rnnConvolutional rnn
Convolutional rnn
 
Neural network의 변천사 이태영
Neural network의 변천사 이태영Neural network의 변천사 이태영
Neural network의 변천사 이태영
 
[신경망기초] 심층신경망개요
[신경망기초] 심층신경망개요[신경망기초] 심층신경망개요
[신경망기초] 심층신경망개요
 
Learning how to explain neural networks: PatternNet and PatternAttribution
Learning how to explain neural networks: PatternNet and PatternAttributionLearning how to explain neural networks: PatternNet and PatternAttribution
Learning how to explain neural networks: PatternNet and PatternAttribution
 

More from KyeongUkJang

Photo wake up - 3d character animation from a single photo
Photo wake up - 3d character animation from a single photoPhoto wake up - 3d character animation from a single photo
Photo wake up - 3d character animation from a single photoKyeongUkJang
 
GAN - Generative Adversarial Nets
GAN - Generative Adversarial NetsGAN - Generative Adversarial Nets
GAN - Generative Adversarial NetsKyeongUkJang
 
Distilling the knowledge in a neural network
Distilling the knowledge in a neural networkDistilling the knowledge in a neural network
Distilling the knowledge in a neural networkKyeongUkJang
 
Latent Dirichlet Allocation
Latent Dirichlet AllocationLatent Dirichlet Allocation
Latent Dirichlet AllocationKyeongUkJang
 
Gaussian Mixture Model
Gaussian Mixture ModelGaussian Mixture Model
Gaussian Mixture ModelKyeongUkJang
 
CNN for sentence classification
CNN for sentence classificationCNN for sentence classification
CNN for sentence classificationKyeongUkJang
 
Visualizing data using t-SNE
Visualizing data using t-SNEVisualizing data using t-SNE
Visualizing data using t-SNEKyeongUkJang
 
Playing atari with deep reinforcement learning
Playing atari with deep reinforcement learningPlaying atari with deep reinforcement learning
Playing atari with deep reinforcement learningKyeongUkJang
 
Chapter 20 Deep generative models
Chapter 20 Deep generative modelsChapter 20 Deep generative models
Chapter 20 Deep generative modelsKyeongUkJang
 
Chapter 19 Variational Inference
Chapter 19 Variational InferenceChapter 19 Variational Inference
Chapter 19 Variational InferenceKyeongUkJang
 
Natural Language Processing(NLP) - basic 2
Natural Language Processing(NLP) - basic 2Natural Language Processing(NLP) - basic 2
Natural Language Processing(NLP) - basic 2KyeongUkJang
 
Natural Language Processing(NLP) - Basic
Natural Language Processing(NLP) - BasicNatural Language Processing(NLP) - Basic
Natural Language Processing(NLP) - BasicKyeongUkJang
 
Chapter 17 monte carlo methods
Chapter 17 monte carlo methodsChapter 17 monte carlo methods
Chapter 17 monte carlo methodsKyeongUkJang
 
Chapter 16 structured probabilistic models for deep learning - 2
Chapter 16 structured probabilistic models for deep learning - 2Chapter 16 structured probabilistic models for deep learning - 2
Chapter 16 structured probabilistic models for deep learning - 2KyeongUkJang
 
Chapter 16 structured probabilistic models for deep learning - 1
Chapter 16 structured probabilistic models for deep learning - 1Chapter 16 structured probabilistic models for deep learning - 1
Chapter 16 structured probabilistic models for deep learning - 1KyeongUkJang
 

More from KyeongUkJang (20)

Photo wake up - 3d character animation from a single photo
Photo wake up - 3d character animation from a single photoPhoto wake up - 3d character animation from a single photo
Photo wake up - 3d character animation from a single photo
 
YOLO
YOLOYOLO
YOLO
 
AlphagoZero
AlphagoZeroAlphagoZero
AlphagoZero
 
GoogLenet
GoogLenetGoogLenet
GoogLenet
 
GAN - Generative Adversarial Nets
GAN - Generative Adversarial NetsGAN - Generative Adversarial Nets
GAN - Generative Adversarial Nets
 
Distilling the knowledge in a neural network
Distilling the knowledge in a neural networkDistilling the knowledge in a neural network
Distilling the knowledge in a neural network
 
Latent Dirichlet Allocation
Latent Dirichlet AllocationLatent Dirichlet Allocation
Latent Dirichlet Allocation
 
Gaussian Mixture Model
Gaussian Mixture ModelGaussian Mixture Model
Gaussian Mixture Model
 
CNN for sentence classification
CNN for sentence classificationCNN for sentence classification
CNN for sentence classification
 
Visualizing data using t-SNE
Visualizing data using t-SNEVisualizing data using t-SNE
Visualizing data using t-SNE
 
Playing atari with deep reinforcement learning
Playing atari with deep reinforcement learningPlaying atari with deep reinforcement learning
Playing atari with deep reinforcement learning
 
Chapter 20 - GAN
Chapter 20 - GANChapter 20 - GAN
Chapter 20 - GAN
 
Chapter 20 - VAE
Chapter 20 - VAEChapter 20 - VAE
Chapter 20 - VAE
 
Chapter 20 Deep generative models
Chapter 20 Deep generative modelsChapter 20 Deep generative models
Chapter 20 Deep generative models
 
Chapter 19 Variational Inference
Chapter 19 Variational InferenceChapter 19 Variational Inference
Chapter 19 Variational Inference
 
Natural Language Processing(NLP) - basic 2
Natural Language Processing(NLP) - basic 2Natural Language Processing(NLP) - basic 2
Natural Language Processing(NLP) - basic 2
 
Natural Language Processing(NLP) - Basic
Natural Language Processing(NLP) - BasicNatural Language Processing(NLP) - Basic
Natural Language Processing(NLP) - Basic
 
Chapter 17 monte carlo methods
Chapter 17 monte carlo methodsChapter 17 monte carlo methods
Chapter 17 monte carlo methods
 
Chapter 16 structured probabilistic models for deep learning - 2
Chapter 16 structured probabilistic models for deep learning - 2Chapter 16 structured probabilistic models for deep learning - 2
Chapter 16 structured probabilistic models for deep learning - 2
 
Chapter 16 structured probabilistic models for deep learning - 1
Chapter 16 structured probabilistic models for deep learning - 1Chapter 16 structured probabilistic models for deep learning - 1
Chapter 16 structured probabilistic models for deep learning - 1
 

Chapter 6 Deep feedforward networks - 2

  • 1. Deep Feedforward Networks 6.4 Architecture Design 6.5 Back-propagation
  • 2. 6.4 Architecture Design 신경망의 구조도 설계 1. 신경망의 층 개수 2. 층들의 상호 연결 방식 3. 각 층의 계산 단위 개수 Architecture는 unit개수나 unit들의 연결 방 식 등을 포괄하는, 신경망의 전반적인 구조 대부분의 신경망 아키텍처는 다수의 층을, 각 층이 그 이전 층의 결과를 입력으로 받 는 함수로서 작용하는 형태의 사슬 구조로 조직화된다. 이러한 사슬 기반 아키텍처에서 신경망의 구조에 관한 주된 고려사항은 신경망의 깊 이와 각 층의 너비를 선택하는 것이다. 대부분은 층(layer)이라고 부르는 단위들의 묶음으로 조직화 된다.
  • 3. http://www.asimovinstitute.org/neural-network-zoo/ RNN / LSTM / RBM / DBN …. 아시모프 인스튜티트(The Asimov Institute) 6.4 Architecture Design
  • 4. 6.4 Architecture Design 신경망의 구조도 설계 1. 신경망의 층 개수 2. 층들의 상호 연결 방식 3. 각 층의 계산 단위 개수 보편근사정리(Universal Approximation Theorem, UAT) 배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer Perceptron)로 그 함수를 표현할 수 있음을 뜻한다.
  • 5. 현재 가장 많이 사용되는 딥러닝 모델 CNN DBN 6.4 Architecture Design
  • 6. 6.4 Architecture Design 신경망의 구조도 설계 1. 신경망의 층 개수 2. 층들의 상호 연결 방식 3. 각 층의 계산 단위 개수 보편근사정리(Universal Approximation Theorem, UAT) 배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer Perceptron)로 그 함수를 표현할 수 있음을 뜻한다.
  • 7. 6.4 Architecture Design 보편근사정리(Universal Approximation Theorem, UAT) 배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer Perceptron)로 그 함수를 표현할 수 있음을 뜻한다. y = 3sin(x)cos(x)(6x^2+3x^3+x)tan(x) 여러 개의 layer로 구현 하나의 layer로 구현
  • 8. 6.4 Architecture Design 보편근사정리(Universal Approximation Theorem, UAT) 배우고자 하는 함수가 어떤 것이든 큰 MLP(Multi Layer Perceptron)로 그 함수를 표현할 수 있음을 뜻한다. y = 3sin(x)cos(x)(6x^2+3x^3+x)tan(x) 보편근사정리에 따르면, 주어진 함수 를 우리가 원하는 정확도로 근사하기 에 충분한 크기의 신경망이 존재한다. 그러나 그러한 신경망이 얼마나 큰지 를 정리가 말해 주지는 않는다. 최악의 경우 필요한 hidden layer 개수 는 지수적(거듭제곱 규모)일 수 있다.
  • 9. 깊이의 효과. 신경망은 깊을수록 더 잘 일반화 된다. [Goodfellow et al. 2014d] Test set 정확도는 깊이의 증가에 따라 일관되게 증가한다. 6.4 Architecture Design
  • 10. convolution 신경망의 깊이를 증가하지 않고 매개변수만 늘리는 것은 test set 정확도 향상에 효과적이지 못하다. 특히, 깊은 모형은 함수가 다수의 더 단순한 함수들을 조합한 형태이어야 한다는 믿음을 나타낸다. 6.4 Architecture Design
  • 13. 더 깊은 망이 학습 데이터 속에 존재 하는 대표적인 개념을 잘 추출할 수 있어 학습 결과가 좋아진다 그러나 망이 깊어질수록 파라미터의 수가 비례적으로 늘어나게 되어 학습 을 시키기가 어려워지는 단점이 있다. 6.4 Architecture Design
  • 14. 6.4 Architecture Design 더 깊은 망의 단점을 layer를 skip하면서 학습하도록 설계해서 극복했다 Fast net이라고도 불린다
  • 15. 매번 통과할 때 마다 거치는 layer의 구 성이 달라진다 >> 다양한 결과 도출 경로가 여러 개이긴 하지만, 특정한 경 로로 진입하면 경로에 포함된 모든 layer를 거쳐야 하기 때문에 다양한 결 과를 내지 못한다
  • 16. 6.5 Back-propagation and Other differentiation Algorithms
  • 17. Back propagation 인공신경망의 원리 킬로미터를 마일로 변환해주는 기계 가정 마일 = 킬로미터 x c 실제사례 킬로미터 마일 1 0 0 2 100 62.137 C를 찾기 위해선?? 오차 = 실제 값 – 계산 값 = 62.137 – 50 = 12.137
  • 18. Back propagation 인공신경망의 원리 킬로미터를 마일로 변환해주는 기계 가정 마일 = 킬로미터 x c 실제사례 킬로미터 마일 1 0 0 2 100 62.137 C를 찾기 위해선?? 오차 = 2.137 오차 = -7.863 직전 시도를 거울삼아 파라미터 를 조금씩 조정해 나간다
  • 19. Back propagation 인공신경망의 원리 분류도 예측과 그다지 다르지 않다 직선은 미지의 곤충들을 측정 값(폭과 길이)에 기초해 분 류하는 용도로 사용한다.
  • 20. Back propagation 인공신경망의 원리 분류도 예측과 그다지 다르지 않다 애벌레다!
  • 21. Back propagation 인공신경망의 원리 분류자 학습시키기 Training data Y = Ax 분할선이 직선이므로 임의의 방정식 가정 좋은 분류자는 아니다 A = 0.25로 랜덤하게 설정
  • 22. Back propagation 인공신경망의 원리 분류자 학습시키기 Training data Y = Ax 분할선이 직선이므로 임의의 방정식 가정 Y = 0.25 x 3.0 = 0.75 Training data 대입 오차 = 목표 값 – 실체 출력 값 E = 1.1 – 0.75 = 0.35
  • 23. Back propagation 인공신경망의 원리 분류자 학습시키기 Y = Ax T = (A +ΔA)x E = 1.1 – 0.75 = 0.35 ΔA = E/ x = 0.35/ 3.0 = 0.1167 현재 0.25라는 값을 가지는 A를 0.1167만큼 업데이트 해야한다
  • 24. Back propagation 인공신경망의 원리 분류자 학습시키기 이번에는 목표 t 를 2.9로 설정 마지막으로 학습한 Training data에 맞 춰진 업데이트 결과만 얻는다 업데이트의 정도를 조금씩 조정해야 한다 ΔA = E/ x = 2.5333/ 1.0 = 2.5333 즉 x = 1.0 일 때 이 함수는 목표 값 인 .2.9를 출력 새로운 A는 A + ΔA = 0.3667 + 2.5333 = 2.9로 업데이트
  • 25. Back propagation 인공신경망의 원리 분류자 학습시키기 이번에는 목표 t 를 2.9로 설정 마지막으로 학습한 Training data에 맞 춰진 업데이트 결과만 얻는다 업데이트의 정도를 조금씩 조정해야 한다 ΔA = E/ x = 2.5333/ 1.0 = 2.5333 즉 x = 1.0 일 때 이 함수는 목표 값 인 .2.9를 출력 새로운 A는 A + ΔA = 0.3667 + 2.5333 = 2.9로 업데이트 L 을 Learning rate 이라고 부른다
  • 26. Back propagation 인공신경망의 원리 분류자 학습시키기 X = 1.0이고 A=0.3083이므로 Y = 0.3083 x 1.0 = 0.3083 목표 값은 2.9이므로 오차는 2.9 – 0.3083 = 2.5914 두번째 학습 데이터 적용 ΔA = L(E/x) = 0.5 x (2.5914/1.0) = 1.2958 따라서 업데이트 된 A는 0.3083 + 1.2958 = 1.6042 비교적 간단한 기법인 학습률만 적용했을 뿐인 데 분할선에 매우 빠르게 도달!
  • 27. Back propagation 인공신경망의 원리 2개의 layer와 2개의 뉴런만 존재하는 신경망의 예 2개의 입력 값 각각 1.0 , 0.5 W(1.1) = 0.9 W(1.2) = 0.2 W(2.1) = 0.3 W(2.2) = 0.8 로 가정 X = (1.0 x 0.9) + (0.5 x 0.3) = 0.9 + 0.15 = 1.05 X = (1.0 x 0.2) + (0.5 x 0.8) = 0.2 + 0.4 = 0.6 1.05 0.6
  • 28. Back propagation 인공신경망의 원리 여러 개의 노드가 결과 값과 오차에 영향을 주는 경우에는 가중치를 어떻게 업데이트 해야 할까?
  • 29. Back propagation 인공신경망의 원리 오차를 각각의 노드에 가중치 만큼 비례해 나누어 준다 그리고 그를 바탕으로 W를 업데이트 한다 이를 오차역전파라고 말한다
  • 30. Back propagation 인공신경망의 원리 W11 = 2.0, W12 = 1.0 출력Layer의 오차E가 0.8 0.8 을 2/3, 1/3 으로 비례해서 이전 Layer 가중치에 전달한다. 각 각 0.32 , 0.48 인공신경망에서 학습이란 연결 노드의 가중치를 업데이트 하는 과정을 의미한다.
  • 32. Back propagation 인공신경망의 원리 가중치의 계산 무차별 대입은 비용이 너무 크다 3개의 노드를 가지는 3개의 Layer로 이루 어진 신경망에는 총 18개의 가중치 존재 가중치 범위 -1~1 사이의 값이 1000개로 제한된다고 가정한다고 해도 총 18000가지 경우의 수를 테스트 해야한 다 500개 노드면 5억 가지 조합 하나의 조합 연산하는데 1초가 걸린다고 해도 16년이 걸림
  • 34. Back propagation 인공신경망의 원리 Vanishing gradient descent problem Sigmoid나, tanh 등의 activation function들은 매우 비선형적인 방식 으로 그들의 input을 매우 작은 output range로 짓이겨 넣는다(squash) 해결은 ReLU