MCPcopy Create free account
hub / github.com/pytorch/tutorials / __init__

Method __init__

beginner_source/serving_tutorial.py:73–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71
72class MNISTNet(nn.Module):
73 def __init__(self):
74 super().__init__()
75 self.conv1 = nn.Conv2d(1, 32, 3, 1)
76 self.dropout1 = nn.Dropout(0.25)
77 self.conv2 = nn.Conv2d(32, 64, 3, 1)
78 self.fc1 = nn.Linear(9216, 128)
79 self.dropout2 = nn.Dropout(0.5)
80 self.fc2 = nn.Linear(128, 10)
81
82 def forward(self, x):
83 x = self.conv1(x)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected