인공지능 (기본 딥러닝)/딥러닝 및 파이토치 기타 정리16 [Pytorch] 모델 생성시, super().__init__() 파이토치를 활용해서 모델을 만들면 항상 Super(class명, self).__init__() = Super().__init__() 를 해주었는데 어떤 기능을 하는건지 확인을 해보았다. (뒤의 두개는 같은 기능임) import torch.nn as nn # Neural Network, activation function 모듈의 기본 클래스 import torch class model_name(nn.Moudle): def__init__(self): super(model_name,self).__init__() self.layer_1=nn.Linear( in_features=32, out_features=16 ) def forward(self,x): x=self.layer_1(x) return x ➢ 부모 클.. 2023. 11. 1. 오차함수 vs 최적화함수 vs 활성화 함수. 1. 오차함수(error function) =손실함수(loss function)=비용함수(cost function) ➢ 학습을 통해 나온 예측값과, 실제값(ground truth)값의 차. ➢예시) MAE,MSE, Cross Entropy 등등.. 참고할 만한 블로그(오차 함수 정리 해둠.):https://heekangpark.github.io/SKKU_swe3050/04-error-functions 2.최적화 함수 ➢ loss(오차) 값을 줄여나가는 방법으로 가중치(weight)를 업데이트 해가며 학습함. ➢예시) Adam, RMSProp 등등.. (=오차 역전파, 역전파) 참고할 만한 블로그(최적화 함수 정리 해둠.): https://east-rain.github.io/docs/Deep%20Lear.. 2023. 3. 16. [퍼옴] 머신러닝 모델 활성화함수(Activation function) 선택 방법. 출처:https://joytk.tistory.com/51 2023. 3. 9. [퍼옴] Epoch, Step, Batch size 정리 출처: http://esignal.co.kr/ai-ml-dl/?board_name=ai_ml_dl&search_field=fn_title&order_by=fn_pid&order_type=desc&board_page=1&list_type=list&vid=15 예시설명이 너무 좋아서 보고 반해버렸다.. ➢ Batch size 크기 선택 : 결론: 일반적으로는 작은것 사용 클수록: 학습속도 빠름, 비교적 안정적인 학습이 가능. (local optimal 에 빠질 위험 존재.) 작을수록: local optimal 에서 빠져나올수 수있다. (출처:https://ladun.tistory.com/85) 2023. 2. 28. 이전 1 2 3 다음