Skip to content

Commit 78a3265

Browse files
committed
Fix poolformer group_matcher to merge proj downsample with previous block, support coarse
1 parent 37b6920 commit 78a3265

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

timm/models/poolformer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ def group_matcher(self, coarse=False):
234234
return dict(
235235
stem=r'^patch_embed', # stem and embed
236236
blocks=[
237-
(r'^network\.(\d+)\.(\d+)', None),
238-
(r'^network\.(\d+)', (0,)),
237+
(r'^network\.(\d+).*\.proj', (99999,)),
238+
(r'^network\.(\d+)', None) if coarse else (r'^network\.(\d+)\.(\d+)', None),
239239
(r'^norm', (99999,))
240240
],
241241
)

0 commit comments

Comments
 (0)