-
Notifications
You must be signed in to change notification settings - Fork 0
/
stare.sh
48 lines (45 loc) · 1.79 KB
/
stare.sh
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
%%bash
# launch final training with five random seeds for VTAB-dmlab, sun397 and eurosat. The hyperparameters are the same from our paper.
model_root='./model/' #'/mnt/data1/llr_data/AMD_Classification/model/'
data_path='/data/yedu/FSL/AMD_Classification/fewshot/'
output_dir='./vpt_prompt/stare_shallow/'
for i in "1"; do
for seed in "42" "44" "82" "100" "800"; do
CUDA_VISIBLE_DEVICES=2 python train.py \
--config-file configs/prompt/stare.yaml \
MODEL.TYPE "vit" \
DATA.BATCH_SIZE "2" \
MODEL.PROMPT.NUM_TOKENS "100" \
MODEL.PROMPT.DEEP "False" \
MODEL.PROMPT.DROPOUT "0.1" \
DATA.FEATURE "sup_vitb16_imagenet21k" \
DATA.NUMBER_CLASSES "2" \
SOLVER.BASE_LR "0.25" \
SOLVER.WEIGHT_DECAY "0.001" \
SEED ${seed} \
MODEL.MODEL_ROOT "${model_root}" \
DATA.DATAPATH "${data_path}" \
OUTPUT_DIR "${output_dir}/test${i}/seed${seed}" \
DATA.num "${i}"
done
done
for i in "2" "4" "8" "16"; do
for seed in "42" "44" "82" "100" "800"; do
CUDA_VISIBLE_DEVICES=2 python train.py \
--config-file configs/prompt/stare.yaml \
MODEL.TYPE "vit" \
DATA.BATCH_SIZE "2" \
MODEL.PROMPT.NUM_TOKENS "100" \
MODEL.PROMPT.DEEP "False" \
MODEL.PROMPT.DROPOUT "0.1" \
DATA.FEATURE "sup_vitb16_imagenet21k" \
DATA.NUMBER_CLASSES "2" \
SOLVER.BASE_LR "0.25" \
SOLVER.WEIGHT_DECAY "0.001" \
SEED ${seed} \
MODEL.MODEL_ROOT "${model_root}" \
DATA.DATAPATH "${data_path}" \
OUTPUT_DIR "${output_dir}/test${i}/seed${seed}" \
DATA.num "${i}"
done
done