|
import torch |
|
import torch.nn as nn |
|
import pandas as pd |
|
import numpy as np |
|
|
|
DROPOUTX = 0.10 |
|
|
|
class SimplePlusNN2(nn.Module): |
|
def __init__(self, input_size, num_classes): |
|
super(SimplePlusNN2, self).__init__() |
|
self.fc1 = nn.Linear(input_size, 128) |
|
self.relu = nn.ReLU() |
|
self.fc2 = nn.Linear(128, 32) |
|
self.relu = nn.ReLU() |
|
self.fc3 = nn.Linear(32, 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 |