MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / forward

Method forward

timm/models/efficientnet.py:536–552  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

534 self.feature_hooks = FeatureHooks(hooks, self.named_modules())
535
536 def forward(self, x) -> List[torch.Tensor]:
537 x = self.conv_stem(x)
538 x = self.bn1(x)
539 x = self.act1(x)
540 if self.feature_hooks is None:
541 features = []
542 if 0 in self._stage_out_idx:
543 features.append(x) # add stem out
544 for i, b in enumerate(self.blocks):
545 x = b(x)
546 if i + 1 in self._stage_out_idx:
547 features.append(x)
548 return features
549 else:
550 self.blocks(x)
551 out = self.feature_hooks.get_output(x.device)
552 return list(out.values())
553
554
555def _create_effnet(variant, pretrained=False, **kwargs):

Callers

nothing calls this directly

Calls 1

get_outputMethod · 0.80

Tested by

no test coverage detected