Data/Data Science
2020. 11. 23.
[Pytorch] Basic Neural Network
Neural Network 기본틀 저장 import torch import torch.nn.functional as F # 모델선언 class NeuralNet(torch.nn.Module): def __init__(self, input_size, hidden_size): super(NeuralNet, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.linear_1 = torch.nn.Linear(self.input_size, self.hidden_size) self.linear_2 = torch.nn.Linear(self.hidden_size, 1) def forward(self, input_tensor)..