timm documentation

MambaOut

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

MambaOut

类别: CNN · 代码: timm/models/mambaout.py · 架构: 11 · 预训练权重: 12(其中 11 个包含 ImageNet-1k 结果)

MambaOut 堆叠了门控 CNN 块和不含状态空间模型(SSM)令牌混合器的 Mamba 块,以测试 SSM 对于图像分类是否必要。

论文

用法

请参阅快速入门了解如何加载预训练权重、进行图像预处理和微调,以及查阅特征提取了解如何将模型用作骨干网络。

>>> import timm
>>> model = timm.create_model('mambaout_tiny.in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)

模型 API 支持

功能MambaOut
features_only=True 特征图✓(步长 4、8、16、32)
forward_intermediates()✓
prune_intermediate_layers()✓
任意输入尺寸,无需更改✓
set_input_size()–
dynamic_img_size=True–
set_grad_checkpointing()✓
逐层学习率衰减(group_matcher())✓
reset_classifier()✓

✓ 支持,✓ (square) 仅支持方形尺寸,✗ 不支持,– 无需支持(模型本身已接受任意输入尺寸)。通过在每个功能上运行随机初始化的模型(MambaOut 使用 mambaout_femto,尺寸为 224)进行验证,预期同一类的其他架构表现相同。详情请参阅 Model API 页面。

架构

架构参数(M)GMAC输入大小预训练权重
mambaout_base84.8115.832241
mambaout_base_plus_rw101.6619.192243
mambaout_base_short_rw88.8316.312241
mambaout_base_tall_rw86.4816.152241
mambaout_base_wide_rw94.4517.782241
mambaout_femto7.301.162241
mambaout_kobe9.141.522241
mambaout_small48.498.962241
mambaout_small_rw48.508.962241
mambaout_tiny26.554.492241
test_mambaout0.450.031600

GMACs 和参数量对应于每种架构的默认输入大小和分类器,数据来自基准测试结果。

预训练权重

Top-1 是 results-imagenet.csv 中在所列评估规模下的 ImageNet-1k 验证准确率,- 表示该权重没有 ImageNet-1k 结果(例如预训练权重或图文权重)。Classes 是预训练分类器的大小,对于没有分类器的权重则为 none。

权重输入大小Top-1(%)评估大小类许可证Hub
mambaout_base.in1k224(测试 288)84.7302881000apache-2.0timm
mambaout_base_plus_rw.sw_e150_in12k224(测试 288)--11821apache-2.0timm
mambaout_base_plus_rw.sw_e150_in12k_ft_in1k224(测试 288)86.9162881000apache-2.0timm
mambaout_base_plus_rw.sw_e150_r384_in12k_ft_in1k38487.5083841000apache-2.0timm
mambaout_base_short_rw.sw_e500_in1k224(测试 288)84.8422881000apache-2.0timm
mambaout_base_tall_rw.sw_e500_in1k224(测试 288)84.9882881000apache-2.0timm
mambaout_base_wide_rw.sw_e500_in1k224(测试 288)84.9662881000apache-2.0timm
mambaout_femto.in1k224(测试 288)79.9122881000apache-2.0timm
mambaout_kobe.in1k224(测试 288)81.0642881000apache-2.0timm
mambaout_small.in1k224(测试 288)84.5122881000apache-2.0timm
mambaout_small_rw.sw_e450_in1k224(测试 288)84.6042881000apache-2.0timm
mambaout_tiny.in1k224(测试 288)83.4522881000apache-2.0timm
Update on GitHub