18 lines
378 B
Python
18 lines
378 B
Python
from torch import nn
|
|
|
|
|
|
class NeuralNetwork(nn.Module):
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.layers = nn.Sequential(
|
|
nn.Linear(58, 128),
|
|
nn.ReLU(),
|
|
nn.Linear(128, 128),
|
|
nn.ReLU(),
|
|
nn.Linear(128, 2),
|
|
nn.Softmax(1)
|
|
)
|
|
|
|
def forward(self, x):
|
|
return self.layers(x)
|