paranormal-or-skeptic/network.py

15 lines
392 B
Python
Raw Permalink Normal View History

2022-06-08 10:59:39 +02:00
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