본문 바로가기
네이버 부스트캠프 AI Tech/Deep Learning Basics

[부스트캠프 AI Tech] Optimization

by 중앙백 2022. 2. 7.
Important concepts in Optimiazation
  • Generalization
    training data 학습을 계속하면 training error는 줄어들지만 test error는 증가하고 둘 사이의 generalization gap도 증가

 

  • Under-fitting vs. Over-fitting
    학습을 계속하면 over fitting이 될 가능성이 있으므로 적당한 횟수로 학습해야 함

 

  • Cross validation

 

  • Bias-variance tradeoff
    cost를 최소화하려면 bias, variance, noise 관점에서 접근해야 하고 이 셋은 trade-off 관계를 가짐

  • Bootstrapping
    : any test or metric that uses random sampling with replacement. 랜덤 샘플링해서 학습한다(?)

 

  • Bagging and boosting
    - Bagging(Bootstrapping aggregating): bootstrapping으로 병렬적으로 여러 모델을 만듬
    - Boosting: weak learner를 이어 sequence 형태로 하나의 strong model을 구성

 


  • Gradient Descent : First-order iterative optimization algorithm for finding a local minimum of a differentiable function
  • Practical Gradient Descent Methods
    - Stochastic gradient descent : Uptdate with the gradient computed from a single sample
    - Mini-batch gradient descent : ~ from a subset of data
    - Batch gradient descent : ~ from the whole data

batch size 클수록 shrp minimum, 작을수록 flat minium

 


Gradient Descent Methods
  • Stochastic gradient descent
  • Momentum
    이전의 기울기 상태를 고려해주는 방법
  • Nesterov accelerated gradient
    이동한 후의 상태를 고려해주는 방법
  • Adagrad
    더 적게, 작게 업데이트된 파라미터를 이후에는 더 크게 업데이트하는 방법.
    오랜 기간 학습하면 Gt가 무한정커지는 문제가 있음
  • Adadelta
    Adagrad에서 Gt가 무한이 커지는 것을 보완한 버전.
    하지만 learning rate가 없다는 단점이 존재. 우리가 조작할 수 있는 게 없음.
  • RMSprop
    stepsize를 추가
  • Adam
    가장 잘 작동하는 것...

 


Regularization
  • Early stopping
    validation error가 증가하는 시점에 training을 멈춤
    validation error를 측정하기 위해서 validation data가 필요
  • Parameter norm penalty
    it adds smoothness to the function space
  • Data augmentation
    딥러닝에서 데이터는 다다익선.
    그래서 제한된 숫자의 데이터를 비틀거나 뒤집거나 돌려서 데이터를 증식시킴
  • Noise robustness
    random noise를 input, weight에 넣어주면 더 나은 성능을 보임
  • Label smoothing
    ⊙ Mix-up
    ⊙ CutMix
  • Dropout
    forward pass에서 랜덤하게 몇몇 뉴런을 0으로.
  • Batch normalization
    batch에서 mean과 variance를 계산해 normalize하면 더 나은 성능을 보인다고 알려짐.

댓글