mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Update metaformers.py
This commit is contained in:
parent
3de6859d9b
commit
a51d1073f5
@ -666,6 +666,7 @@ def checkpoint_filter_fn(state_dict, model):
|
||||
|
||||
k = re.sub(r'downsample_layers.([0-9]+)', r'stages.\1.downsample', k)
|
||||
k = k.replace('downsample.proj', 'downsample.conv')
|
||||
k = k.replace('patch_embed.proj', 'patch_embed.conv')
|
||||
k = re.sub(r'([0-9]+).([0-9]+)', r'\1.blocks.\2', k)
|
||||
k = k.replace('stages.0.downsample', 'patch_embed')
|
||||
k = re.sub(r'^head', 'head.fc', k)
|
||||
|
Loading…
x
Reference in New Issue
Block a user