15 lines
392 B
Python
15 lines
392 B
Python
import torch
|
|
|
|
class LogisticRegressionModel(torch.nn.Module):
|
|
def __init__(self, features=100):
|
|
super(LogisticRegressionModel, self).__init__()
|
|
self.fc = torch.nn.Linear(features,400)
|
|
self.fc2 = torch.nn.Linear(400,1)
|
|
|
|
def forward(self, x):
|
|
x = self.fc(x)
|
|
x = torch.relu(x)
|
|
x = self.fc2(x)
|
|
x = torch.sigmoid(x)
|
|
return x
|