| 302 | from torch import nn |
| 303 | |
| 304 | class Mnist_Logistic(nn.Module): |
| 305 | def __init__(self): |
| 306 | super().__init__() |
| 307 | self.weights = nn.Parameter(torch.randn(784, 10) / math.sqrt(784)) |
| 308 | self.bias = nn.Parameter(torch.zeros(10)) |
| 309 | |
| 310 | def forward(self, xb): |
| 311 | return xb @ self.weights + self.bias |
| 312 | |
| 313 | ############################################################################### |
| 314 | # Since we're now using an object instead of just using a function, we |
no outgoing calls
no test coverage detected