Skip to content

Commit

Permalink
Merge branch 'davit_head_update' into ml-decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
fffffgggg54 committed Dec 10, 2023
2 parents f59c1f1 + 318369a commit 08b7837
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions timm/models/davit.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,7 @@ def forward_features(self, x):
return x

def forward_head(self, x, pre_logits: bool = False):
x = self.head.global_pool(x)
x = self.head.norm(x)
x = self.head.flatten(x)
x = self.head.drop(x)
return x if pre_logits else self.head.fc(x)
return self.head(x, pre_logits=True) if pre_logits else self.head(x)

def forward(self, x):
x = self.forward_features(x)
Expand Down

0 comments on commit 08b7837

Please # to comment.