mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
ViTamin in_chans !=3 weight load fix
This commit is contained in:
parent
5517b054dd
commit
7702d9afa1
@ -281,7 +281,7 @@ class GeGluMlp(nn.Module):
|
||||
def _create_vitamin(variant, pretrained=False, embed_cfg=None, **kwargs):
|
||||
out_indices = kwargs.pop('out_indices', 3)
|
||||
assert embed_cfg is not None
|
||||
backbone = MbConvStages(cfg=embed_cfg)
|
||||
backbone = MbConvStages(cfg=embed_cfg, in_chans=kwargs.get('in_chans', 3))
|
||||
kwargs['embed_layer'] = partial(HybridEmbed, backbone=backbone, proj=False)
|
||||
kwargs.setdefault('patch_size', 1) # default patch size for hybrid models if not set
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user