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

Method forward

intermediate_source/ensembling.py:38–45  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

36 self.fc3 = nn.Linear(128, 10)
37
38 def forward(self, x):
39 x = x.flatten(1)
40 x = self.fc1(x)
41 x = F.relu(x)
42 x = self.fc2(x)
43 x = F.relu(x)
44 x = self.fc3(x)
45 return x
46
47######################################################################
48# Let’s generate a batch of dummy data and pretend that we’re working with

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected