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

Method __init__

intermediate_source/per_sample_grads.py:27–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25
26class SimpleCNN(nn.Module):
27 def __init__(self):
28 super(SimpleCNN, self).__init__()
29 self.conv1 = nn.Conv2d(1, 32, 3, 1)
30 self.conv2 = nn.Conv2d(32, 64, 3, 1)
31 self.fc1 = nn.Linear(9216, 128)
32 self.fc2 = nn.Linear(128, 10)
33
34 def forward(self, x):
35 x = self.conv1(x)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected