전체 글(327)
-
4. CNN
Convolution 연산 - filter와 image의 element-wise multiply 계산 - filter에 따라 blur, emboss, outline 등 효과를 줄 수 있다. - stride, padding의 개념도 이해해야 함. - 1x1 convolution : dimension reduction(=reduce the number of parameters while increasing the depth) CNN consists of convolution layer, pooling layer and fully connected layer - convolution layer and pooling layer : feature extraction - fully connected layer : ..
2023.11.21 -
3. Deep Learning 용어 정리
optimization : local optima이 가기 위한 최적화. Generalization : 일반화. 즉 test set에 대해 성능이 좋나? - underfitting : 애초에 학습이 별로 잘 되지 않음. 이유는 학습 데이터셋이 부족할 확률이 존재. - overfitting : train set에 과적합. 해결 방법은 cross-validation Bias , Variance - Bias : 모델의 성능 - Variance : 일관적인가? 재현률. Bootstrapping - make random sampling with replacement (apply different any test or metric) - bagging : 학습 데이터를 n개로 쪼개고 n개의 모델을 만든 후 앙상블(ag..
2023.11.20 -
2. Neural Network 개념 및 코드
Neural Network - function that stack affine transformations followed by non-linear transformers. - 즉 비선형 함수를 stacking한 함수를 Neural Network라고 부른다. 이렇게 표현하는게 조금 더 수학적인 표현이다. - affine transformer(=linear transformers) : 점,직선,평면을 보존하는 선형 매핑 방법. 즉 matrix multiply. - affine transformer(아핀 변환) 라는건 m차원의 input을 n차원의 output으로 변환 Multi-Layer Perceptron(=N-layer Neural Network) - 다양한 loss function 존재. model ..
2023.11.20 -
1. Deep Learning introduction
Key components of Deep Learning 1. Data 2. Model 3. Loss function Deep Learning History 2012 - AlexNet 2013 - DQN(알파고 알고리즘) 2014 - Encoder/Decoder, Adam 2015 - GAN, ResNet 2016 - 2017 - Transformer(=Attention is all you need) 2018 - Bert(fine-tuned NLP models) 2019 - Big Language Models(GPT-X) 2020 - Self-Supervised Learning
2023.11.20 -
10. GPU OOM(Out Of Memory) 해결방법
Out Of Memory 문제? 1. batch size 줄여라 2. GPU clean 3. 다시 실행 !pip install GPUtil import GPUtil GPUtil.showUtilization() # 현재 GPU 상태를 보여줌!! iteration 마다 메모리가 늘어나는지 확인. torch.cuda.empty_cache() # 사용되지 않는 cache clean. 근데.......... 경험상 도움이 되지 않았던 경우가 많았다. ** Tip: 1. training loop 내에서 tensor로 축적되는 변수를 확인해서 없애줄 것.(=메모리 낭비) - 1-d tensor의 경우 python 기본 객체로 변환. tensor.item 을 활용해서 메모리 적재되는 것을 방지하자. 2. del명령어 ..
2023.11.17 -
9. Hyper-parameter tuning
마른 수건도 짜보자! 개념 성능에 있어서 영향을 끼치는 것 1. 모델 2. 데이터 3. 하이퍼 파라미터 이때 모델은 알려져있는바가 다 같아서 크게 중요 x 데이터가 상대적으로 중요한 추세. 하이퍼 파라미터는 마른 수건도 짜보는 마지막 쥐어짜기 단계. 기본적으로 grid-search / random search - 근데 시간 너무 많이 걸림 최근엔 베이지안 기법들이 추세.
2023.11.17