반응형

https://chacha95.github.io/2019-04-04-logit/

 

Sigmoid, Logit and Softmax

딥러닝 모델의 마지막 노드들에 출력되는 값을 바꿀 때 왜 logit함수와 softmax를 쓸가요? neural net을 이용한 classification task에 서의 맨 마지막 레이어의 노드들을 생각해 봅시다. 마지막 레이어에 act

chacha95.github.io

https://opentutorials.org/module/3653/22995

logistic + probit  = logit

log + odds

probit은 확률을 재는 단위

odds:  (두 확률의 비율)를 그대로 가져온다고 보시면 됨

 

odds: 그 값이 1보다 큰지 아닌지로 결정의 기준을 세웠다면 

logit은 그 값이 0보다 큰지 아닌지로 결정의 기준을 세웁니다. 

이 두 식은 완전히 같은 의미를 갖는데 , x = 1은 log x는 0이기 때문입니다. 

 

odds, 도박에서 얻을(pay off) 확률과 잃을(stake) 확률의 비율을 뜻하는 영어단어입니다.

반응형

'Deep learning > 개념' 카테고리의 다른 글

개념  (0) 2021.03.29
loss function  (0) 2021.03.27
Optimizer  (0) 2021.03.27
Activation Function  (0) 2021.03.27
DBN  (0) 2021.03.27
반응형

Receptive Field:

같은 크기의 필터여도 , 풀링에 의해 작아진 특징 맵에 적용되면 원본 영상에서 차지하는 범위가 넓다. 

이 범위를 Receptive Field 라고 한다.

영상이 있을 때  -> 3x3 kernel -> 풀링 -> 상대적으로 3x3 크지면서 영상 원래 에서 보면 6x6으로

pooling하면서 적은 것에서 -> 넓은 영역으로 

 

반응형

'Deep learning > 개념' 카테고리의 다른 글

logit 의 뜻  (0) 2021.07.02
loss function  (0) 2021.03.27
Optimizer  (0) 2021.03.27
Activation Function  (0) 2021.03.27
DBN  (0) 2021.03.27
반응형

loss function

 

regression:

mean_squared_error

 

classification:

Cross-Entropy Loss:

Binary classification:  binary_crossentropy

multi classification : categorical_crossentropy

 

반응형

'Deep learning > 개념' 카테고리의 다른 글

logit 의 뜻  (0) 2021.07.02
개념  (0) 2021.03.29
Optimizer  (0) 2021.03.27
Activation Function  (0) 2021.03.27
DBN  (0) 2021.03.27
반응형

Optimizer

SGD (Stochastic Gradient Descent): 

Adam (Adaptive Moments)

RMSprop (Root Mean Squared Propagation)

반응형

'Deep learning > 개념' 카테고리의 다른 글

개념  (0) 2021.03.29
loss function  (0) 2021.03.27
Activation Function  (0) 2021.03.27
DBN  (0) 2021.03.27
알고리즘 개념  (0) 2021.03.21
반응형

Activation Function

neuron의 output y를 입력으로 f(y)를 계산

linear system , non-linear system

 

Sigmoid : 0~ 1사이

tanh (Hyperbolic Tangent) :  [−1.0,1.0] 의 범위로 output을 제한함

Step계단 함수: 0아니면 1

ReLU (Rectified Linear Unit) : 0 보다 작은 것을 0으로 수렴하고 0보다 큰것은 원래 값으로 

LeakyReLU :  negative input에 대해 ReLU는 0를 return하나, LeakyReLU는 ax를 return

Softmax: one-hot encoding => 모든 합이 1

 

반응형

'Deep learning > 개념' 카테고리의 다른 글

loss function  (0) 2021.03.27
Optimizer  (0) 2021.03.27
DBN  (0) 2021.03.27
알고리즘 개념  (0) 2021.03.21
top-1 and top-5  (0) 2020.08.18
반응형

심층신뢰망 (DBN, Deep Belief Network)

blog.skby.net/%EC%8B%AC%EC%B8%B5%EC%8B%A0%EB%A2%B0%EB%A7%9D-dbn-deep-belief-network/

 

심층신뢰망 (DBN, Deep Belief Network) > 도리의 디지털라이프

I. Gradient descent vanishing 해결 위한 심층신뢰망 가. 심층신뢰망 (DBN, Deep Belief Network)의 개념 입력층과 은닉층으로 구성된 RBM을 블록처럼 여러 층으로 쌓인 형태로 연결된 신경망 (딥러닝의 일종) RBM

blog.skby.net

 

I. Gradient descent vanishing 해결 위한 심층신뢰망

가. 심층신뢰망 (DBN, Deep Belief Network)의 개념

  • 입력층과 은닉층으로 구성된 RBM을 블록처럼 여러 층으로 쌓인 형태로 연결된 신경망 (딥러닝의 일종)
  • RBM: 제한된 볼츠만 머신(Restricted Boltzmann Machine

 

RBM(제한된 볼츠만 머신, Restricted Boltzmann machine)

은 차원 감소, 분류, 선형 회귀 분석, 협업 필터링(collaborative filtering), 특징값 학습(feature learning) 및 주제 모델링(topic modelling)에 사용할 수 있는 알고리즘으로 Geoff Hinton이 제안한 모델입니다. 

 

medium.com/@ahnchan2/%EC%B4%88%EB%B3%B4%EC%9E%90%EC%9A%A9-rbm-restricted-boltzmann-machines-%ED%8A%9C%ED%86%A0%EB%A6%AC%EC%96%BC-791ce740a2f0

 

 

Deep Belief Networks are stochastic algorithms, meaning that the algorithm utilizes random variables; 

thus, it is normal to obtain slightly different results when running the learning algorithm multiple times. 

To account for this, it is normal to obtain multiple sets of results and average them together prior to reporting final accuracies.

 

stochastic algorithms:tochastic optimization (SO) methods are optimization methods that generate and use random variables. : 랜덤 변수 사용하는 최적화 방법이다.

en.wikipedia.org/wiki/Stochastic_optimization

 

#“stochastic” means that the model has some kind of randomness in it

#https://machinelearningmastery.com/stochastic-in-machine-learning/

반응형
반응형

cs50

 

1.Linear Search

왼쪽부터 오른쪽으로 하나하나씩 조회한다.

 

랜덤으로 되여있다.

o(n)

 

2. binary search

sord 되여있는 것을 

중간 중간 이런식으로 한다.

bi => two

divide conquer

o(log n)

 

big O -> O worst case

 

 

3. bubble sort

bubble sort 옆에 있는것과 비교하여 바꾼다.

 i , i+1

i 위치에 있는것 이 i+1 보다 크면 바꾼다.

O(n**2)

 

4. selection sort

한줄 보면서 제일  작은 것을 기억해서 처음과 잴 작은 것을 바꾼다.

0-> n-1

n(n-1)/ 2 => O(n**2)

 

5. insertion sort

 

 

6. recursion

left right 나누어서 한다. 

 

7. merge sort

left , rigth  따로 따로 하고 합친다.

7 4 5 2   6 3 8 1

4 7     

4 7 2 5

2 4 5 7 

 

6 3 8 1

3 6 1 8

1 3 6 8

 

2 4 5 7 1 3 6 8

 O( n log n )

 

 

반응형

'Deep learning > 개념' 카테고리의 다른 글

Optimizer  (0) 2021.03.27
Activation Function  (0) 2021.03.27
DBN  (0) 2021.03.27
top-1 and top-5  (0) 2020.08.18
선형회귀분석 ,군집화 ,다층 계층 신경망 ,병렬처리 ,부록 A: 한국어판 : 순환 신경망과 LSTM  (0) 2020.08.18
반응형

Deep learning 관련 논문을 볼 때 top-1 와 top-5 error 라는 용어들이 나온다.

top-1와 top-5 error는 이미지 분류성능을 평가하기 위한 것 들이다.

 

Top-1 accuracy is the conventional accuracy, which means that the model answer (the one with the highest probability) must be exactly the expected answer.

Top-5 accuracy means that any of your model that gives 5 highest probability answers that must match the expected answer.

 

A picture of a cat is shown, and these are the outputs of your neural network:

예:

  • Tiger: 0.4
  • Dog: 0.3
  • Cat: 0.1
  • Lynx: 0.09
  • Lion: 0.08
  • Bird: 0.02
  • Bear: 0.01

 

In the above-mentioned probabilities:

Using top-1 accuracy, you will count this output as wrong, because it predicted a tiger.

Using top-5 accuracy, you count this output as correct, because the cat is among the top-5 guesses.

 

top-5 accuracy : 이미지 50개를 분류하는데 , 앞의 5개의 class 를 최대 확률 의 분류를  찾은 다음 , 정확한 label이 

앞의 5개에 있는지 확인한다. 있으면 분류 성공했다.

 

--------------------------------------------------------------------------------------------------------------------------------

 

예를 들어 :

정답 Ground Truth : cat 

예측한 결과 :  prediction : 0.4 Tiger

예:

  • Tiger: 0.4
  • Dog: 0.3
  • Cat: 0.1
  • Lynx: 0.09
  • Lion: 0.08
  • Bird: 0.02
  • Bear: 0.01

top-1 은 False 

top-5 은 Tiger, Dog, Cat, Lynx, Lion 중에서 Cat이 있어서  True이다. 

 

 

 

<참고 자료 >:

https://intellipaat.com/community/6715/evaluation-calculate-top-n-accuracy-top-1-and-top-5

반응형

'Deep learning > 개념' 카테고리의 다른 글

Optimizer  (0) 2021.03.27
Activation Function  (0) 2021.03.27
DBN  (0) 2021.03.27
알고리즘 개념  (0) 2021.03.21
선형회귀분석 ,군집화 ,다층 계층 신경망 ,병렬처리 ,부록 A: 한국어판 : 순환 신경망과 LSTM  (0) 2020.08.18

+ Recent posts