Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
jasonhuang 989febc9fd | 1 year ago | |
---|---|---|
.. | ||
README.md | 1 year ago | |
README_CN.md | 1 year ago | |
convit.png | 1 year ago | |
convit_base_ascend.yaml | 1 year ago | |
convit_base_plus_ascend.yaml | 1 year ago | |
convit_small_ascend.yaml | 1 year ago | |
convit_small_plus_ascend.yaml | 1 year ago | |
convit_tiny_ascend.yaml | 1 year ago | |
convit_tiny_gpu.yaml | 1 year ago | |
convit_tiny_plus_ascend.yaml | 1 year ago |
ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biases
ConViT combines the strengths of convolutional architectures and Vision Transformers (ViTs). ConViT introduce gated positional self-attention (GPSA), a form of positional self-attention which can be equipped with a “soft” convolutional inductive bias. ConViT initialize the GPSA layers to mimic the locality of convolutional layers, then give each attention head the freedom to escape locality by adjusting a gating parameter regulating the attention paid to position versus content information. ConViT, outperforms the DeiT (Touvron et al., 2020) on ImageNet, while offering a much improved sample efficiency.
Model | Context | Top-1 (%) | Top-5 (%) | Params (M) | Train T. | Infer T. | Download | Config | Log |
---|---|---|---|---|---|---|---|---|---|
convit_tiny | D910x8-G | 73.66 | 91.72 | 6 | 243s/epoch | 50.7ms/step | model | cfg | log |
convit_tiny_plus | D910x8-G | 77.00 | 93.60 | 10 | 246s/epoch | 40.9ms/step | model | cfg | log |
convit_small | D910x8-G | 81.63 | 95.59 | 27 | 491s/epoch | 36.4ms/step | model | cfg | log |
convit_small_plus | D910x8-G | 81.8 | 95.42 | 48 | 557s/epoch | 32.7ms/step | model | cfg | log |
convit_base | D910x8-G | 82.10 | 95.52 | 86 | 880s/epoch | 32.8ms/step | model | cfg | log |
convit_base_plus | D910x8-G | 81.96 | 95.04 | 152 | 1031s/epoch | 36.6ms/step | model | cfg | log |
Please refer to the installation instruction in MindCV.
Please download the ImageNet-1K dataset for model training and validation.
Hyper-parameters. The hyper-parameter configurations for producing the reported results are stored in the yaml files in mindcv/configs/convit
folder. For example, to train with one of these configurations, you can run:
# train convit_tiny on 8 Ascends
python train.py --config configs/convit/convit_tiny_ascend.yaml --data_dir /path/to/imagenet
Note that the number of GPUs/Ascends and batch size will influence the training results. To reproduce the training result at most, it is recommended to use the same number of GPUs/Ascends with the same batch size.
Detailed adjustable parameters and their default value can be seen in config.py.
To validate the model, you can use validate.py
. Here is an example for convit_tiny to verify the accuracy of your training.
python validate.py --config configs/convit/convit_tiny_ascend.yaml --data_dir /path/to/imagenet --ckpt_path /path/to/convit_tiny.ckpt
Please refer to the deployment tutorial in MindCV.
No Description
Jupyter Notebook Python Markdown Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》