timm documentation

MambaOut

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v1.0.31).
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 (ImageNet-1kの結果を含む11)

MambaOutは、状態空間モデル(SSM)トークンミキサーを備えないMambaブロックとGated CNNブロックをスタックし、画像分類に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()✓
レイヤーごとのLR減衰(group_matcher())✓
reset_classifier()✓

✓ 対応、✓ (square) 正方形サイズのみ対応、✗ 非対応、– 不要(モデルは任意の入力サイズを既に受け付ける)。各機能をランダム初期化されたモデル(224のMambaOutとmambaout_femto)で実行して確認しています。同じクラスの他のアーキテクチャも同様に動作すると予想されます。詳細はModel APIページを参照してください。

アーキテクチャ

アーキテクチャパラメータ数 (M)GMACs入力サイズ事前学習済み重み
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