text
stringlengths
0
77
class LinearNet(nn.Module):
def __init__(self, input_size = 784, latent_space = 16, n_classes = 10,):
super().__init__()
self.fc1 = nn.Linear(input_size, latent_space)
self.fc2 = nn.Linear(latent_space, n_classes)
def forward(self, x):
x = self.fc1(x)
x = self.fc2(x)
output = F.log_softmax(x, dim=1)
return output