MCPcopy Create free account
hub / github.com/Sirwenhao/Deep-Learning-Notes / forward

Method forward

CV/Pytorch_classification/VGGNet/model.py:32–39  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

30 self._initialize_weights()
31
32 def forward(self, x):
33 # N x 3 x 224 x 224
34 x = self.features(x)
35 # N x 512 x 7 x 7
36 x = torch.flatten(x, start_dim=1)
37 # N x 512*7*7
38 x = self.classifier(x)
39 return x
40
41 def _initialize_weights(self):
42 for m in self.modules():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected