Presentation is loading. Please wait.

Presentation is loading. Please wait.

Parallel software design lab. 박 창 규

Similar presentations


Presentation on theme: "Parallel software design lab. 박 창 규"— Presentation transcript:

1 Parallel software design lab. 박 창 규
Ch ~ 11.6 Parallel software design lab. 박 창 규

2 11.4.2 Automatic Hyperparameter Optimization Algorithms
이상적인 learning algorithm은 hyperparameter를 조정해줄 필요 없이 output funciont을 낼 수 있다. 4개 이상의 hyperparameter를 조정하였을 때 이득을 취하는 경우도 있음. User가 비슷한 task에 적용하기 위한 neural network의 hyperparameter를 조정해온 data가 많다면 manual hyperparameter tuning이 가능. → 대다수 불가능

3 11.4.2 Automatic Hyperparameter Optimization Algorithms
Hyperparameter optimization algorithm을 이용하여 최적의 parameter를 찾을 수 있다. 단, hyperparameter optimization algorithm 역시 값의 범위와 같은, hyperparameter를 가지고 있다. 위와 같은 2차적 hyperparameter를 정해주는 것이 상대적으로 더 쉽다.

4 11.4.3 Grid Search Hyperparameter가 3개 이하일 때, grid search를 사용한다.
각각의 hyperparameter에 대해 user가 작은 유한한 값의 집합을 설정한다. 그 후, Grid search algorithm은 각각의 hyperparameter에 대해 train을 하고 그 중 최적의 validation set error를 가지는 실험에서 최적의 hyperparameter를 구할 수 있다.

5 Grid Search SVM classifier에서 regularization constant C, kernel hyperparameter γ 에 대하여 다음과 같을 때, Grid search는 두 벡터의 Cartesian product 내부의 (C, γ) pair 를 통해 train되며, validation set에서의 performance를 계산한다. → 가장 높은 performance의 setting을 선택. Cartesian product로 인해 computational cost가 exponentially 상승한다.

6 Random Search Grid search의 대안(faster to good value of the hyperparameter). Sample parameter setting들을 고정된 횟수만큼 random하게 찾는 것이 high-dimensional space에서 더 효과적이라는 사실이 밝혀짐. 어떠한 hyperparameter는 loss function에 영향을 미치지 않기 때문이다.(grid search는 모든 hyperparameter를 전부 계산)

7 11.4.5 Model-Based Hyperparameter Optimization
최적화 문제의 결정값은 hyperparameter이며, cost는 hyperparameter를 이용하여 training한 결과로 부터 얻은 validation set error이다. Validation set error를 위한 model을 구성한 뒤, model 내에서 최적화를 수행하여 새로운 hyperparameter 추정값을 제시한다.

8 11.5 Debugging Strategies Machine learning을 debugging하는 것은 어렵다.
우리자신이 구체화 할 수 없는 유용한 행위들을 발견하기 위해 사용하기 때문이다. 만약 새로운 classification task에 대하여 train하여 5%의 test error을 얻었을 때, 예측한 행위를 했는지 아닌지 알 수 없다. 또한 multiple parts로 구성되어 있어 한 부분이 이상이 생기면 다른 부분도 이 이상을 받아들이고, 결과에 영향을 미치게 된다.

9 11.5 Debugging Strategies Visualize the model in action
Image를 통해 object detection을 하는 경우 원본 image위에 결과물을 겹쳐서 확인해 보라 Speech에 대한 model 생성의 경우 model이 만들어 낸 speech sample을 들어 보아라. Bug를 계산하는 경우 오히려 user의 system이 정확하다는 오류로 빠질 수 있다. Visualize the worst mistakes 일반적으로 maximum likelihood training의 경우 overfitting 될 수 있다. 이러한 특성은 오히려 낮은 확률로 정확한 label을 받을 수 있는 예제를 사용하였을 때 유용할 수 있다. 올바르지 않은 model의 training set example을 봄으로써 data preprocessing이나 label에서의 문제점을 찾을 수 있다.

10 11.5 Debugging Strategies Reasoning about software using train and test error 종종 Software가 정확하게 구현된 것인지 결정하기 어렵다. train and test set에서 단서를 얻을 수 있다. train error 는 낮고 test error가 높다면 overfitting test set 계산을 위해 model을 불러온 후 model을 저장하는 과정에서 문제가 되어 test error가 잘못 측정되었을 가능성도 있다. 만약 train error 와 test error가 둘 다 높다면 software의 문제인지, algorithm문제로 인한 underfitting인지 확인하기 어렵다.

11 11.5 Debugging Strategies Fit a tiny dataset
Training set에 높은 error가 발생한다면 underfitting인지 software문제인지 결정해야 한다. 아무리 작은 model이여도 작은 dataset에 대해 적합함을 보장한다. 작은 dataset에 적합한지 확인하고 dataset의 크기를 늘려라

12 11.5 Debugging Strategies Compare back-propagated derivatives to numerical derivatives User가 직접 gradient computation을 구현해야 하는 framework를 사용하고 있다면, 대부분의 error는 user 구현부에서 일어난다. 계산결과가 옳은지 확인하는 방법은 user가 구현한 automatic differentiation의 결과와 finite difference의 결과를 비교하는 것이다. 보통 gradient computation의 경우 vector value function이기 때문에 finite difference를 vector element의 수 만큼 진행하거나 random하게 추출하여 일부만 진행한다.

13 11.5 Debugging Strategies Monitor histograms of activations and gradient 많은 training iteration을 통해 얻은 activations나 gradients들을 시각화하는데 유용하다. Hidden unit의 Pre-activation value를 통해 unit이 saturate 되었는지, 얼마나 saturate되는지 알 수 있다. Ex) tanh unit의 절대값은 unit이 얼마나 saturate되었는지 보여줌.


Download ppt "Parallel software design lab. 박 창 규"

Similar presentations


Ads by Google