We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c82598f commit 2597ce2Copy full SHA for 2597ce2
timm/models/davit.py
@@ -570,11 +570,7 @@ def forward_features(self, x):
570
return x
571
572
def forward_head(self, x, pre_logits: bool = False):
573
- x = self.head.global_pool(x)
574
- x = self.head.norm(x)
575
- x = self.head.flatten(x)
576
- x = self.head.drop(x)
577
- return x if pre_logits else self.head.fc(x)
+ return self.head(x, pre_logits=True) if pre_logits else self.head(x)
578
579
def forward(self, x):
580
x = self.forward_features(x)
0 commit comments