MCPcopy Create free account
hub / github.com/ChristianInterno/ReStraV / MLP

Class MLP

demo.py:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10#Load model
11class MLP(nn.Module):
12 def __init__(self, in_dim=21, h1=64, h2=32):
13 super().__init__()
14 self.net = nn.Sequential(
15 nn.Linear(in_dim, h1),
16 nn.ReLU(),
17 nn.Linear(h1, h2),
18 nn.ReLU(),
19 nn.Linear(h2, 1)
20 )
21 def forward(self, x):
22 return self.net(x)
23
24
25device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

Callers 1

demo.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected