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

Method __init__

intermediate_source/pruning_tutorial.py:45–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43
44class LeNet(nn.Module):
45 def __init__(self):
46 super(LeNet, self).__init__()
47 # 1 input image channel, 6 output channels, 5x5 square conv kernel
48 self.conv1 = nn.Conv2d(1, 6, 5)
49 self.conv2 = nn.Conv2d(6, 16, 5)
50 self.fc1 = nn.Linear(16 * 5 * 5, 120) # 5x5 image dimension
51 self.fc2 = nn.Linear(120, 84)
52 self.fc3 = nn.Linear(84, 10)
53
54 def forward(self, x):
55 x = F.max_pool2d(F.relu(self.conv1(x)), (2, 2))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected