Skip to content

Commit

Permalink
Merge pull request #1903 from twmht/fix_num_classes
Browse files Browse the repository at this point in the history
fix num_classes not found in repvit
  • Loading branch information
rwightman authored Aug 7, 2023
2 parents 81089b1 + bb2b6b5 commit f677190
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions timm/models/repvit.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def __init__(self, dim, num_classes, distillation=False):
super().__init__()
self.head = NormLinear(dim, num_classes) if num_classes > 0 else nn.Identity()
self.distillation = distillation
self.num_classes=num_classes
if distillation:
self.head_dist = NormLinear(dim, num_classes) if num_classes > 0 else nn.Identity()

Expand Down

0 comments on commit f677190

Please sign in to comment.