-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_incremental_lwf.sh
73 lines (66 loc) · 2.11 KB
/
run_incremental_lwf.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
dataset=$1;
modality=$2;
if [ $dataset = AVE ];then
num_classes=28
class_num_per_step=7
num_workers=0
if [ $modality = audio ];then
max_epoches=300
elif [ $modality = visual ];then
max_epoches=200
elif [ $modality = audio-visual ];then
max_epoches=200
else
echo "modality must be \"audio\", \"visual\", or \"audio-visual\"";
exit;
fi
elif [ $dataset = ksounds ];then
num_classes=30
class_num_per_step=6
if [ $modality = audio ];then
num_workers=0
max_epoches=200
elif [ $modality = visual ];then
num_workers=4
max_epoches=200
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
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 LwF
CUDA_VISIBLE_DEVICES=3 nohup python -u train_incremental_lwf.py \
--dataset $dataset \
--num_classes $num_classes \
--class_num_per_step $class_num_per_step \
--modality $modality \
--max_epoches $max_epoches \
--num_workers $num_workers \
--lr 1e-3 \
--lr_decay False \
--milestones 100 \
--weight_decay 1e-4 \
--train_batch_size 256 \
--infer_batch_size 128 > nohup_lwf.log 2>&1 &