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

Method forward

beginner_source/hyperparameter_tuning_tutorial.py:117–124  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

115 self.fc3 = nn.Linear(l2, 10)
116
117 def forward(self, x):
118 x = self.pool(F.relu(self.conv1(x)))
119 x = self.pool(F.relu(self.conv2(x)))
120 x = torch.flatten(x, 1) # flatten all dimensions except batch
121 x = F.relu(self.fc1(x))
122 x = F.relu(self.fc2(x))
123 x = self.fc3(x)
124 return x
125
126######################################################################
127# Define the search space

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected