diff --git a/model/src/models/fully_connected.py b/model/src/models/fully_connected.py index 03f53e3..772ff86 100644 --- a/model/src/models/fully_connected.py +++ b/model/src/models/fully_connected.py @@ -1,4 +1,4 @@ -import torch.nn as nn +from torch import nn class FullyConnectedModel(nn.Module): @@ -8,11 +8,11 @@ class FullyConnectedModel(nn.Module): def __init__(self, num_out_features: int): super().__init__() # define layers - self.fc2 = nn.Linear(in_features=512, out_features=128) + self.fc1 = nn.Linear(in_features=512, out_features=128) + self.af1 = nn.ReLU() + self.fc2 = nn.Linear(in_features=128, out_features=32) self.af2 = nn.ReLU() - self.fc3 = nn.Linear(in_features=128, out_features=32) - self.af3 = nn.ReLU() - self.fc4 = nn.Linear(in_features=32, out_features=num_out_features) + self.fc3 = nn.Linear(in_features=32, out_features=num_out_features) def forward(self, x): """Pass input through model.""" @@ -21,6 +21,4 @@ class FullyConnectedModel(nn.Module): x = self.fc2(x) x = self.af2(x) x = self.fc3(x) - x = self.af3(x) - x = self.fc4(x) return x