MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / _forward_impl

Method _forward_impl

lib/Resnext_torch.py:196–220  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

194 return nn.Sequential(*layers)
195
196 def _forward_impl(self, x):
197 # See note [TorchScript super()]
198 features = []
199 x = self.conv1(x)
200 x = self.bn1(x)
201 x = self.relu(x)
202 x = self.maxpool(x)
203
204 x = self.layer1(x)
205 features.append(x)
206
207 x = self.layer2(x)
208 features.append(x)
209
210 x = self.layer3(x)
211 features.append(x)
212
213 x = self.layer4(x)
214 features.append(x)
215
216 #x = self.avgpool(x)
217 #x = torch.flatten(x, 1)
218 #x = self.fc(x)
219
220 return features
221
222 def forward(self, x):
223 return self._forward_impl(x)

Callers 1

forwardMethod · 0.95

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected