Skip to content

Commit

Permalink
Update ml_decoder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fffffgggg54 committed Dec 29, 2024
1 parent 5c32658 commit fbeed51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timm/layers/ml_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def __init__(
num_groups = num_classes if num_groups < 1 else num_groups

# case using class embed
if have_class_embed:
if self.have_class_embed:
assert len(class_embed) == num_classes, 'ML-Decoder got class_embed where dim 0 != num_classes'
self.shared_fc = True
class_embed = class_embed.clone().detach() # copy instead of reference, detach gradient flow
Expand Down

0 comments on commit fbeed51

Please sign in to comment.