mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Enable features_only properly
This commit is contained in:
parent
1b66ec7cf3
commit
58591a97f7
@ -279,6 +279,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)
|
||||
kwargs['embed_layer'] = partial(HybridEmbed, backbone=backbone, proj=False)
|
||||
@ -289,6 +290,7 @@ def _create_vitamin(variant, pretrained=False, embed_cfg=None, **kwargs):
|
||||
variant,
|
||||
pretrained,
|
||||
pretrained_filter_fn=checkpoint_filter_fn,
|
||||
feature_cfg=dict(out_indices=out_indices, feature_cls='getter'),
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user