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

Method forward

intermediate_source/pruning_tutorial.py:54–61  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

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))
56 x = F.max_pool2d(F.relu(self.conv2(x)), 2)
57 x = x.view(-1, int(x.nelement() / x.shape[0]))
58 x = F.relu(self.fc1(x))
59 x = F.relu(self.fc2(x))
60 x = self.fc3(x)
61 return x
62
63model = LeNet().to(device=device)
64

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected