Aug-ViT inserts additional paths with learnable parameters in parallel on the original shortcuts for alleviating the feature collapse. The block-circulant projection is used to implement augmented shortcut, which brings negligible increase of computational cost.
Paper: Yehui Tang, Kai Han, Chang Xu, An Xiao, Yiping Deng, Chao Xu, Yunhe Wang. Augmented Shortcuts for Vision Transformers. NeurIPS 2021.
A block of Aug-ViT is show below:
Dataset used: CIFAR-10
AugViT
├── eval.py # inference entry
├── fig
│ └── augvit.png # the illustration of augvit network
├── readme.md # Readme
└── src
├── config.py # config of model and data
├── c10_dataset.py # dataset loader
└── augvit.py # augvit network
After installing MindSpore via the official website, you can start evaluation as follows:
# infer example
GPU: python eval.py --model augvit_s --dataset_path cifar_dataset --platform GPU --checkpoint_path [CHECKPOINT_PATH]
checkpoint can be downloaded at https://download.mindspore.cn/model_zoo/research/cv/augvit/.
result: {'acc': 0.98} ckpt= ./augvit_c10.ckpt
In dataset.py, we set the seed inside "create_dataset" function. We also use random seed in train.py.
Please check the official homepage.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。