티스토리 뷰
1. Tensorflow 싸이트의 Decaying the learning rate |
글을 작성하기전 Tensorflow에서 제공하고 있는 5개의 decay함수에 대한 정의가 들어있는 싸이트이다.
2. tf.train.exponential_decay 사용법 |
사용법 설명은 맨 첫번재 decay 함수인 tf.train.exponential_decay를 설명할 것이다. 홈페이지에 명시되어 있는 파라메터는 다음과 같다.
▪ learning_rate: A scalar float32 or float64 Tensor or a Python number. The initial learning rate.
▪ global_step : A scalar int32 or int64 Tensor or a Python number. Global step to use for the decay computation. Must not be negative.
▪ decay_steps : A scalar int32 or int64 Tensor or a Python number. Must be positive. See the decay computation above.
▪ decay_rate : A scalar float32 or float64 Tensor or a Python number. The decay rate.
▪ staircase : Boolean. If True decay the learning rate at discrete intervals
▪ name : String. Optional name of the operation. Defaults to 'ExponentialDecay'.
다음은 사용 예제이다.
예제의 파라메터 하나씩 보자.
예제에서 첫 번째 파라메터로 들어간 starter_learning_rate는 말 그대로 최초 학습시 사용될 learning_rate이다.
두 번째 파라메터로 사용된 global_step은 현재 학습 횟수이다.
세 번째 파라메터는 위 예제에서는 100000이 들어갔는데 총 학습 횟수이다.
네 번째 파라메터는 얼마나 rate가 감소될 것인가를 나타낸다. 매번 0.96이 곱해진다고 생각하면 된다.
다섯 번째 파라메터는 이산적으로 학습 속도 감속 유무이다. 나는 이산적으로라는 말의 정의가 무엇인지 잘 모르겠지만 해당 파라메터가 true일때 decay_rate 즉 4번째 파라메터에 (global_step / decay_steps)의 승수가 적용된다.
decayed_learning_rate = learning_rate * decay_rate ^ (global_step / decay_steps)
'SoftWare > 머신러닝' 카테고리의 다른 글
MLP Sample Code(Keras) (0) | 2018.06.08 |
---|---|
수식과 코드로 보는 경사하강법(SGD,Momentum,NAG,Adagrad,RMSprop,Adam,AdaDelta) (3) | 2018.05.29 |
Multilayer Perceptron(MLP) Tutorial (1) | 2018.02.23 |
Logistic Regression(Classification) (0) | 2018.02.12 |
Regression 종류 및 특징 (0) | 2018.02.09 |
- Total
- Today
- Yesterday
- Res
- Service
- 5582
- java
- 자바 입출력
- 유전 알고리즘
- 카운터
- 인텐트
- vim
- 아두이노
- 안드로이드
- php
- vim 설치
- java 파일 입출력
- android
- 포켓몬 Go
- 포켓몬 고
- 서버
- Java Decompiler
- Notification
- 유전
- 파일입출력
- 파일 입출력
- c언어
- 테라펀딩 #투게더펀딩 #P2P투자 #부동산 소액 투자 #카카오 #토스
- LISTVIEW
- counter
- java url
- 알고리즘
- jad
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |