Skip to content

Commit edd3d73

Browse files
committed
Add missing dropout for head reset in ConvNeXt default head
1 parent b093dcb commit edd3d73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

timm/models/convnext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" ConvNext
1+
""" ConvNeXt
22
33
Paper: `A ConvNet for the 2020s` - https://arxiv.org/pdf/2201.03545.pdf
44
@@ -229,6 +229,7 @@ def __init__(
229229
('global_pool', SelectAdaptivePool2d(pool_type=global_pool)),
230230
('norm', norm_layer(self.num_features)),
231231
('flatten', nn.Flatten(1) if global_pool else nn.Identity()),
232+
('drop', nn.Dropout(self.drop_rate)),
232233
('fc', nn.Linear(self.num_features, num_classes) if num_classes > 0 else nn.Identity())
233234
]))
234235

0 commit comments

Comments
 (0)