From 5f2bebd7cafe8af74e458e077b0e4fc66a08c6b3 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Thu, 12 Jan 2023 11:37:33 -0800 Subject: [PATCH] Update metaformers.py --- timm/models/metaformers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/models/metaformers.py b/timm/models/metaformers.py index 015db95b..0020e789 100644 --- a/timm/models/metaformers.py +++ b/timm/models/metaformers.py @@ -779,7 +779,7 @@ def checkpoint_filter_fn(state_dict, model): for k, v in state_dict.items(): k = re.sub(r'downsample_layers.([0-9]+)', r'stages.\1.downsample', k) - k = re.sub(r'([0-9]+).([0-9]+)', r'stages.\1.blocks.\2', k) + k = re.sub(r'([0-9]+).([0-9]+)', r'\1.blocks.\2', k) out_dict[k] = v return out_dict