공부
-
[PyTorch] nn.Linear공부/pytorch 2023. 2. 2. 10:14
Pytorch 공식 문서 선형 회귀 모델 torch.nn.Linear(in_features,out_features,bias = True, device = None,dtype = None) in_features는 input sample의 size out_features는 output sample의 size bias는 만일 False로 설정되어 있으면 layer는 bias를 학습하지 않는다. 기본값은 True이다. device는 CPU, GPU 중 고르는 것 dtype은 자료형의 타입을 정하는 것 https://wikidocs.net/55409 03-04 nn.Module로 구현하는 선형 회귀 이전 챕터까지는 선형 회귀를 좀 더 직접적으로 이해하기 위해 가설, 비용 함수를 직접 정의해서 선형 회귀 모..