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

Method forward

CV/Pytorch_classification/DenseNet/model.py:139–145  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

137 nn.init.constant_(m.bias, 0)
138
139 def forward(self, x):
140 features = self.features(x)
141 out = F.relu(features, inplace=True)
142 out = F.adaptive_avg_pool2d(out, (1, 1))
143 out = torch.flatten(out, 1)
144 out = self.classifier(out)
145 return out
146
147def densenet121(**kwargs):
148 return DenseNet(growth_rate=32, block_config=(6, 12, 24, 16), num_init_features=64, **kwargs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected