From 78a32655fab61614b4399f08e34396539fc9026e Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Mon, 9 May 2022 12:20:04 -0700 Subject: [PATCH] Fix poolformer group_matcher to merge proj downsample with previous block, support coarse --- timm/models/poolformer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timm/models/poolformer.py b/timm/models/poolformer.py index 3cf6b1a3..17d657b0 100644 --- a/timm/models/poolformer.py +++ b/timm/models/poolformer.py @@ -234,8 +234,8 @@ class PoolFormer(nn.Module): return dict( stem=r'^patch_embed', # stem and embed blocks=[ - (r'^network\.(\d+)\.(\d+)', None), - (r'^network\.(\d+)', (0,)), + (r'^network\.(\d+).*\.proj', (99999,)), + (r'^network\.(\d+)', None) if coarse else (r'^network\.(\d+)\.(\d+)', None), (r'^norm', (99999,)) ], )