def __init__(self, num_hidden: int = 50) -> None: # TODO: Introduce linear modules (aka linear layers) self.w1 = Parameter(10, num_hidden) self.b1 = Parameter(num_hidden) self.w2 = Parameter(num_hidden, 4) self.b2 = Parameter(4)
def __init__(self, num_hidden: int = 50) -> None: self.w1 = Parameter(10, num_hidden) self.b1 = Parameter(num_hidden) self.w2 = Parameter(num_hidden, 4) self.b2 = Parameter(4)
def __init__(self) -> None: self.w = Parameter(3) self.b = Parameter()
def __init__(self) -> None: self.w = Parameter( 3) # tensor (3,) requires_grad = True, random values self.b = Parameter()