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

Method __init__

beginner_source/blitz/cifar10_tutorial.py:129–136  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127
128class Net(nn.Module):
129 def __init__(self):
130 super().__init__()
131 self.conv1 = nn.Conv2d(3, 6, 5)
132 self.pool = nn.MaxPool2d(2, 2)
133 self.conv2 = nn.Conv2d(6, 16, 5)
134 self.fc1 = nn.Linear(16 * 5 * 5, 120)
135 self.fc2 = nn.Linear(120, 84)
136 self.fc3 = nn.Linear(84, 10)
137
138 def forward(self, x):
139 x = self.pool(F.relu(self.conv1(x)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected