MCPcopy Create free account
hub / github.com/TingsongYu/PyTorch_Tutorial / __init__

Method __init__

Code/utils/utils.py:14–22  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12
13class Net(nn.Module):
14 def __init__(self):
15 super(Net, self).__init__()
16 self.conv1 = nn.Conv2d(3, 6, 5)
17 self.pool1 = nn.MaxPool2d(2, 2)
18 self.conv2 = nn.Conv2d(6, 16, 5)
19 self.pool2 = nn.MaxPool2d(2, 2)
20 self.fc1 = nn.Linear(16 * 5 * 5, 120)
21 self.fc2 = nn.Linear(120, 84)
22 self.fc3 = nn.Linear(84, 10)
23
24 def forward(self, x):
25 x = self.pool1(F.relu(self.conv1(x)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected