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

Method forward

beginner_source/blitz/cifar10_tutorial.py:138–145  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

136 self.fc3 = nn.Linear(84, 10)
137
138 def forward(self, x):
139 x = self.pool(F.relu(self.conv1(x)))
140 x = self.pool(F.relu(self.conv2(x)))
141 x = torch.flatten(x, 1) # flatten all dimensions except batch
142 x = F.relu(self.fc1(x))
143 x = F.relu(self.fc2(x))
144 x = self.fc3(x)
145 return x
146
147
148net = Net()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected