MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / forward

Method forward

pycontrast/networks/resnet.py:209–223  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

207 return nn.Sequential(*layers)
208
209 def forward(self, x):
210 x = self.conv1(x)
211 x = self.bn1(x)
212 x = self.relu(x)
213 x = self.maxpool(x)
214
215 x = self.layer1(x)
216 x = self.layer2(x)
217 x = self.layer3(x)
218 x = self.layer4(x)
219
220 x = self.avgpool(x)
221 x = torch.flatten(x, 1)
222
223 return x
224
225
226def _resnet(arch, block, layers, pretrained, progress, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected