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

Method __init__

Code/main_training/main.py:70–78  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68
69class Net(nn.Module):
70 def __init__(self):
71 super(Net, self).__init__()
72 self.conv1 = nn.Conv2d(3, 6, 5)
73 self.pool1 = nn.MaxPool2d(2, 2)
74 self.conv2 = nn.Conv2d(6, 16, 5)
75 self.pool2 = nn.MaxPool2d(2, 2)
76 self.fc1 = nn.Linear(16 * 5 * 5, 120)
77 self.fc2 = nn.Linear(120, 84)
78 self.fc3 = nn.Linear(84, 10)
79
80 def forward(self, x):
81 x = self.pool1(F.relu(self.conv1(x)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected