-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_finetune.sh
50 lines (45 loc) · 1008 Bytes
/
run_finetune.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
49
50
cd ./image_classification/
# # finetuning on CIFAR10/100
pretrained_weight=path_to_pretrained_weight
# # cifar10
for ((i=0;i<=4;i++))
do
{
data_dir=path/to/cifar10
save_dir=path/to/save/ckpt/seed=$i
mkdir $save_dir
CUDA_VISIBLE_DEVICES=0 python transfer_learning.py \
--dataset 'cifar10' \
--data-dir $data_dir \
--lr 0.05 \
--b 128 \
--num-classes 10 \
--img-size 224 \
--model T2t_vit_14_all_un1d \
--save-dir $save_dir \
--transfer-model $pretrained_weight \
--transfer-learning True \
--seed $i
}
done
# # cifar100
for ((i=0;i<=4;i++))
do
{
data_dir=path/to/cifar100
save_dir=path/to/save/ckpt/seed=$i
mkdir $save_dir
CUDA_VISIBLE_DEVICES=0 python transfer_learning.py \
--dataset 'cifar100' \
--data-dir $data_dir \
--lr 0.05 \
--b 128 \
--num-classes 100 \
--img-size 224 \
--model T2t_vit_14_all_un1d \
--save-dir $save_dir \
--transfer-model $pretrained_weight \
--transfer-learning True \
--seed $i
}
done