1class Model(nn.Module):
2
3
4 def __init__(self, in_features=4, h1=8, h2=9, out_features=3):
5 # how many layers?
6 super().__init__()
7 self.fc1 = nn.Linear(in_features, h1)
8 self.fc2 = nn.Linear(h1, h2)
9 self.out = nn.Linear(h2, out_features)
10
11 def forward(self, x):
12 x = F.relu(self.fc1(x))
13 x = F.relu(self.fc2(x))
14 x = self.out(x)
15
16 return x