Skip to content

Commit

Permalink
Update davit.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fffffgggg54 authored and rwightman committed Dec 11, 2023
1 parent c82598f commit 2597ce2
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 2597ce2

Please sign in to comment.