MCPcopy Create free account
hub / github.com/modAL-python/modAL / __init__

Method __init__

examples/pytorch_integration.py:19–34  ·  view source on GitHub ↗
(self,)

Source from the content-addressed store, hash-verified

17# build class for the skorch API
18class Torch_Model(nn.Module):
19 def __init__(self,):
20 super(Torch_Model, self).__init__()
21 self.convs = nn.Sequential(
22 nn.Conv2d(1,32,3),
23 nn.ReLU(),
24 nn.Conv2d(32,64,3),
25 nn.ReLU(),
26 nn.MaxPool2d(2),
27 nn.Dropout(0.25)
28 )
29 self.fcs = nn.Sequential(
30 nn.Linear(12*12*64,128),
31 nn.ReLU(),
32 nn.Dropout(0.5),
33 nn.Linear(128,10),
34 )
35
36 def forward(self, x):
37 out = x

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected