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
366aae9304
commit
02fcc30eaa
@ -620,6 +620,8 @@ def checkpoint_filter_fn(state_dict, model):
|
||||
k = re.sub(r'([0-9]+).([0-9]+)', r'\1.blocks.\2', k)
|
||||
k = k.replace('stages.0.downsample', 'patch_embed')
|
||||
k = k.replace('patch_embed', 'stem')
|
||||
k = k.replace('post_norm', 'norm')
|
||||
k = k.replace('pre_norm', 'norm')
|
||||
k = re.sub(r'^head', 'head.fc', k)
|
||||
k = re.sub(r'^norm', 'head.norm', k)
|
||||
out_dict[k] = v
|
||||
|
Loading…
x
Reference in New Issue
Block a user