PaddlePaddle reimplementation of facebookresearch's repository for the cait model that was released with the paper CaiT: Going deeper with Image Transformers.
To enjoy some new features, PaddlePaddle 2.4 is required. For more installation tutorials refer to installation.md
# Note: Set the following environment variables
# and then need to run the script on each node.
export PADDLE_NNODES=1
export PADDLE_MASTER="xxx.xxx.xxx.xxx:12538"
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python -m paddle.distributed.launch \
--nnodes=$PADDLE_NNODES \
--master=$PADDLE_MASTER \
--devices=$CUDA_VISIBLE_DEVICES \
plsc-train \
-c ./configs/cait_s24_224_in1k_1n8c_dp_fp16o2.yaml
# [Optional] Download checkpoint
mkdir -p pretrained/
wget -O ./pretrained/cait_s24_224_in1k_1n8c_dp_fp16o2.pdparams https://plsc.bj.bcebos.com/models/cait/v2.4/cait_s24_224_in1k_1n8c_dp_fp16o2.pdparams
export PADDLE_NNODES=1
export PADDLE_MASTER="127.0.0.1:12538"
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python -m paddle.distributed.launch \
--nnodes=$PADDLE_NNODES \
--master=$PADDLE_MASTER \
--devices=$CUDA_VISIBLE_DEVICES \
plsc-eval \
-c ./configs/cait_s24_224_in1k_1n8c_dp_fp16o2.yaml \
-o Global.pretrained_model=pretrained/cait_s24_224_in1k_1n8c_dp_fp16o2 \
-o Global.finetune=False
We provide more directly runnable configurations, see CaiT Configurations.
Model | Phase | Dataset | Configs | GPUs | Img/sec | Top1 Acc | Pre-trained checkpoint | Fine-tuned checkpoint | Log |
---|---|---|---|---|---|---|---|---|---|
cait_s24_224 | pretrain | ImageNet2012 | config | A100*N1C8 | 2473 | 0.82628 | download | log |
@InProceedings{Touvron_2021_ICCV,
author = {Touvron, Hugo and Cord, Matthieu and Sablayrolles, Alexandre and Synnaeve, Gabriel and J\'egou, Herv\'e},
title = {Going Deeper With Image Transformers},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2021},
pages = {32-42}
}