File size: 6,658 Bytes
3c849be |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
#!/bin/bash
DATASET_ROOT=/dataset/imageNet100_sicy/train/ #/raid/common/imagenet-raw/
## train ViT-small for 100 epochs
OUTPUT_ROOT=./exps/vit_small_100ep
NPROC_PER_NODE=8 # GPU numbers
BATCH_SIZE_PER_GPU=64
DEBUG=false # debug = true, then we only load subset of the whole training dataset
python -m torch.distributed.launch --nproc_per_node=$NPROC_PER_NODE main.py \
--data_path $DATASET_ROOT \
--output_dir $OUTPUT_ROOT \
--arch vit_small \
--instance_queue_size 65536 \
--local_group_queue_size 65536 \
--use_bn_in_head false \
--instance_out_dim 256 \
--instance_temp 0.2 \
--local_group_out_dim 256 \
--local_group_temp 0.2 \
--local_group_knn_top_n 8 \
--group_out_dim 65536 \
--group_student_temp 0.1 \
--group_warmup_teacher_temp 0.04 \
--group_teacher_temp 0.04 \
--group_warmup_teacher_temp_epochs 0 \
--norm_last_layer false \
--norm_before_pred true \
--batch_size_per_gpu $BATCH_SIZE_PER_GPU \
--epochs 100 \
--warmup_epochs 10 \
--clip_grad 3.0 \
--lr 0.0008 \
--min_lr 1e-06 \
--patch_embed_lr_mult 0.2 \
--drop_path_rate 0.1 \
--weight_decay 0.04 \
--weight_decay_end 0.2 \
--freeze_last_layer 1 \
--momentum_teacher 0.996 \
--use_fp16 false \
--local_crops_number 10 \
--size_crops 96 \
--global_crops_scale 0.25 1 \
--local_crops_scale 0.05 0.25 \
--timm_auto_augment_par rand-m9-mstd0.5-inc1 \
--prob 0.5 \
--use_prefetcher true \
--debug $DEBUG
## train ViT-small for 300 epochs
OUTPUT_ROOT=./exps/vit_small_300ep
NPROC_PER_NODE=16 # GPU numbers
BATCH_SIZE_PER_GPU=64
DEBUG=false # debug = true, then we only load subset of the whole training dataset
python -m torch.distributed.launch --nproc_per_node=$NPROC_PER_NODE main.py \
--data_path $DATASET_ROOT \
--output_dir $OUTPUT_ROOT \
--arch vit_small \
--instance_queue_size 65536 \
--local_group_queue_size 65536 \
--use_bn_in_head false \
--instance_out_dim 256 \
--instance_temp 0.2 \
--local_group_out_dim 256 \
--local_group_temp 0.2 \
--local_group_knn_top_n 8 \
--group_out_dim 65536 \
--group_student_temp 0.1 \
--group_warmup_teacher_temp 0.04 \
--group_teacher_temp 0.07 \
--group_warmup_teacher_temp_epochs 30 \
--norm_last_layer false \
--norm_before_pred true \
--batch_size_per_gpu $BATCH_SIZE_PER_GPU \
--epochs 300 \
--warmup_epochs 10 \
--clip_grad 3.0 \
--lr 0.0008 \
--min_lr 1e-06 \
--patch_embed_lr_mult 0.2 \
--drop_path_rate 0.1 \
--weight_decay 0.04 \
--weight_decay_end 0.1 \
--freeze_last_layer 1 \
--momentum_teacher 0.996 \
--use_fp16 false \
--local_crops_number 10 \
--size_crops 96 \
--global_crops_scale 0.25 1 \
--local_crops_scale 0.05 0.25 \
--timm_auto_augment_par rand-m9-mstd0.5-inc1 \
--prob 0.5 \
--use_prefetcher true \
--debug $DEBUG
## train ViT-small for 800 epochs
NPROC_PER_NODE=16 # GPU numbers
BATCH_SIZE_PER_GPU=64
DEBUG=false # debug = true, then we only load subset of the whole training dataset
python -m torch.distributed.launch --nproc_per_node=$NPROC_PER_NODE main.py \
--data_path $DATASET_ROOT \
--output_dir $OUTPUT_ROOT \
--arch vit_small \
--instance_queue_size 65536 \
--local_group_queue_size 65536 \
--use_bn_in_head false \
--instance_out_dim 256 \
--instance_temp 0.2 \
--local_group_out_dim 256 \
--local_group_temp 0.2 \
--local_group_knn_top_n 8 \
--group_out_dim 65536 \
--group_student_temp 0.1 \
--group_warmup_teacher_temp 0.04 \
--group_teacher_temp 0.07 \
--group_warmup_teacher_temp_epochs 30 \
--norm_last_layer false \
--norm_before_pred true \
--batch_size_per_gpu $BATCH_SIZE_PER_GPU \
--epochs 800 \
--warmup_epochs 10 \
--clip_grad 3.0 \
--lr 0.0008 \
--min_lr 1e-06 \
--patch_embed_lr_mult 0.2 \
--drop_path_rate 0.1 \
--weight_decay 0.04 \
--weight_decay_end 0.1 \
--freeze_last_layer 1 \
--momentum_teacher 0.996 \
--use_fp16 false \
--local_crops_number 10 \
--size_crops 96 \
--global_crops_scale 0.25 1 \
--local_crops_scale 0.05 0.25 \
--timm_auto_augment_par rand-m9-mstd0.5-inc1 \
--prob 0.5 \
--use_prefetcher true \
--debug $DEBUG
## train ViT-base for 400 epochs
OUTPUT_ROOT=./exps/vit_base_400ep
NPROC_PER_NODE=24 # GPU numbers
BATCH_SIZE_PER_GPU=42
DEBUG=false # debug = true, then we only load subset of the whole training dataset
python -m torch.distributed.launch --nproc_per_node=$NPROC_PER_NODE main.py \
--data_path $DATASET_ROOT \
--output_dir $OUTPUT_ROOT \
--arch vit_base \
--instance_queue_size 65536 \
--local_group_queue_size 65536 \
--use_bn_in_head false \
--instance_out_dim 256 \
--instance_temp 0.2 \
--local_group_out_dim 256 \
--local_group_temp 0.2 \
--local_group_knn_top_n 8 \
--group_out_dim 65536 \
--group_student_temp 0.1 \
--group_warmup_teacher_temp 0.04 \
--group_teacher_temp 0.07 \
--group_warmup_teacher_temp_epochs 50 \
--norm_last_layer false \
--norm_before_pred true \
--batch_size_per_gpu $BATCH_SIZE_PER_GPU \
--epochs 400 \
--warmup_epochs 10 \
--clip_grad 3.0 \
--lr 0.0008 \
--min_lr 2e-06 \
--patch_embed_lr_mult 0.2 \
--drop_path_rate 0.1 \
--weight_decay 0.04 \
--weight_decay_end 0.1 \
--freeze_last_layer 3 \
--momentum_teacher 0.996 \
--use_fp16 false \
--local_crops_number 10 \
--size_crops 96 \
--global_crops_scale 0.25 1 \
--local_crops_scale 0.05 0.25 \
--timm_auto_augment_par rand-m9-mstd0.5-inc1 \
--prob 0.5 \
--use_prefetcher true \
--debug $DEBUG
## train ViT-large for 250 epochs
OUTPUT_ROOT=./exps/vit_large_250ep
NPROC_PER_NODE=40 # GPU numbers
BATCH_SIZE_PER_GPU=16
DEBUG=false # debug = true, then we only load subset of the whole training dataset
python -m torch.distributed.launch --nproc_per_node=$NPROC_PER_NODE main.py \
--data_path $DATASET_ROOT \
--output_dir $OUTPUT_ROOT \
--arch vit_large \
--instance_queue_size 65536 \
--local_group_queue_size 65536 \
--use_bn_in_head false \
--instance_out_dim 256 \
--instance_temp 0.2 \
--local_group_out_dim 256 \
--local_group_temp 0.2 \
--local_group_knn_top_n 8 \
--group_out_dim 65536 \
--group_student_temp 0.1 \
--group_warmup_teacher_temp 0.04 \
--group_teacher_temp 0.07 \
--group_warmup_teacher_temp_epochs 50 \
--norm_last_layer true \
--norm_before_pred true \
--batch_size_per_gpu $BATCH_SIZE_PER_GPU \
--epochs 250 \
--warmup_epochs 10 \
--clip_grad 3.0 \
--lr 0.0015 \
--min_lr 1.5e-4 \
--patch_embed_lr_mult 0.2 \
--drop_path_rate 0.3 \
--weight_decay 0.025 \
--weight_decay_end 0.08 \
--freeze_last_layer 3 \
--momentum_teacher 0.996 \
--use_fp16 false \
--local_crops_number 10 \
--size_crops 96 \
--global_crops_scale 0.25 1 \
--local_crops_scale 0.05 0.25 \
--timm_auto_augment_par rand-m9-mstd0.5-inc1 \
--prob 0.5 \
--use_prefetcher true \
--debug $DEBUG
|