From 2a9f93c064597cd2c3bb2bfa66c544d2405fb1c4 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Thu, 12 Jan 2023 11:36:18 -0800 Subject: [PATCH] Update metaformers.py --- timm/models/metaformers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/timm/models/metaformers.py b/timm/models/metaformers.py index 83c757f2..015db95b 100644 --- a/timm/models/metaformers.py +++ b/timm/models/metaformers.py @@ -779,6 +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) out_dict[k] = v return out_dict