
부스트캠프 AI Tech 2기/Precourse
Linear Regression
예제 공부시간에 따른 점수데이터가 아래와 같이 존재할 때 4시간 공부했을 경우 점수를 예측해보자 시간 점수 1 2 2 4 3 6 4 ??? Hypothesis(가설) y = Wx + b x_train = torch.FloatTensor([[1],[2],[3]]) y_train = torch.FloatTensor([[4],[5],[6]]) W = torch.zeros(1, requires_grad=True) b = torch.zeros(1, requires_grad=True) hypothesis = x_train * W + b weight와 bias를 0으로 초기화 항상 출력 0을 예측 requires_grad = True 학습할 것이라고 명시 Compute Loss MSE를 사용 (이미지출처: boost..