backward1 [Pytorch]Autograd Module torch.nn.Module, forward Input, Output, Forward, Backward을 정의하는 Pytorch에서 모델을 만드는데 필요한 base class class MyLiner(nn.Module): def __init__(self, in_features, out_features, bias=True): super().__init__() self.in_features = in_features self.out_features = out_features self.weights = nn.Parameter( torch.randn(in_features, out_features)) self.bias = nn.Parameter(torch.randn(out_features)) def f.. 2023. 3. 19. 이전 1 다음