-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_incremental_afc.sh
88 lines (81 loc) · 2.62 KB
/
run_incremental_afc.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
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
dataset=$1;
modality=$2;
classifier=$3;
if [ $classifier != NME ] && [ $classifier != LSC ];then
echo "classifier must be \"NME\" or \"LSC\".";
exit;
fi
if [ $dataset = AVE ];then
num_classes=28
class_num_per_step=7
num_workers=0
memory_size=340
gen_exem_batch_size=256
if [ $modality = audio ];then
max_epoches=300
elif [ $modality = visual ];then
max_epoches=200
elif [ $modality = audio-visual ];then
max_epoches=150
else
echo "modality must be \"audio\", \"visual\", or \"audio-visual\".";
exit;
fi
elif [ $dataset = ksounds ];then
num_classes=30
class_num_per_step=6
memory_size=500
gen_exem_batch_size=64
if [ $modality = audio ];then
num_workers=0
max_epoches=300
elif [ $modality = visual ];then
num_workers=4
max_epoches=100
elif [ $modality = audio-visual ];then
num_workers=4
max_epoches=100
else
echo "modality must be \"audio\", \"visual\", or \"audio-visual\".";
exit;
fi
elif [ $dataset = VGGSound_100 ];then
num_classes=100
class_num_per_step=10
memory_size=1500
gen_exem_batch_size=256
if [ $modality = audio ];then
num_workers=0
max_epoches=300
elif [ $modality = visual ];then
num_workers=4
max_epoches=200
elif [ $modality = audio-visual ];then
num_workers=4
max_epoches=200
else
echo "modality must be \"audio\", \"visual\", or \"audio-visual\".";
exit;
fi
else
echo "dataset must be \"AVE\", \"ksounds\", or \"VGGSound_100\".";
exit;
fi
cd AFC
CUDA_VISIBLE_DEVICES=3 nohup python -u train_incremental_afc.py \
--dataset $dataset \
--num_classes $num_classes \
--class_num_per_step $class_num_per_step \
--modality $modality \
--classify $classifier \
--max_epoches $max_epoches \
--num_workers $num_workers \
--memory_size $memory_size \
--lr 1e-3 \
--lr_decay False \
--milestones 100 \
--weight_decay 1e-4 \
--lam_disc 0.5 \
--train_batch_size 256 \
--infer_batch_size 128 \
--gen_exem_batch_size $gen_exem_batch_size > nohup_afc.log 2>&1 &