|
import torch |
|
import torch.nn as nn |
|
import pandas as pd |
|
import numpy as np |
|
|
|
DROPOUTX = 0.05 |
|
|
|
class SimplePlusNN2(nn.Module): |
|
def __init__(self, input_size, num_classes): |
|
super(SimplePlusNN2, self).__init__() |
|
self.fc1 = nn.Linear(input_size, 64) |
|
self.relu = nn.ReLU() |
|
self.fc2 = nn.Linear(64, 8) |
|
self.relu = nn.ReLU() |
|
self.fc3 = nn.Linear(8, 1) |
|
self.dropout = nn.Dropout(DROPOUTX) |
|
self.sigmoid = nn.Sigmoid() |
|
|
|
def forward(self, x): |
|
x = self.relu(self.fc1(x)) |
|
x = self.relu(self.fc2(x)) |
|
x = self.dropout(x) |
|
x = self.sigmoid(self.fc3(x)) |
|
return x |