Note
You are reading the documentation for MMClassification 0.x, which will soon be deprecated at the end of 2022. We recommend you upgrade to MMClassification 1.0 to enjoy fruitful new features and better performance brought by OpenMMLab 2.0. Check the installation tutorial, migration tutorial and changelog for more details.
Conformer¶
- class mmcls.models.Conformer(arch='tiny', patch_size=16, base_channels=64, mlp_ratio=4.0, qkv_bias=True, with_cls_token=True, drop_path_rate=0.0, norm_eval=True, frozen_stages=0, out_indices=- 1, init_cfg=None)[source]¶
Conformer backbone.
A PyTorch implementation of : Conformer: Local Features Coupling Global Representations for Visual Recognition
- Parameters
arch (str | dict) – Conformer architecture. Defaults to ‘tiny’.
patch_size (int) – The patch size. Defaults to 16.
base_channels (int) – The base number of channels in CNN network. Defaults to 64.
mlp_ratio (float) – The expansion ratio of FFN network in transformer block. Defaults to 4.
with_cls_token (bool) – Whether use class token or not. Defaults to True.
drop_path_rate (float) – stochastic depth rate. Defaults to 0.
out_indices (Sequence | int) – Output from which stages. Defaults to -1, means the last stage.
init_cfg (dict, optional) – Initialization config dict. Defaults to None.