-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.cmd
73 lines (55 loc) · 2.72 KB
/
run.cmd
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
@ECHO OFF
:::::::::::::::::::::::
:: Single-Task Net
:::::::::::::::::::::::
:train_baseline
REM 结论:bs大于32会过拟合,lr越小越好约1e-5量级
REM 使用同一的设置 B=32, lr=2e-5
REM 96.38%/42.76% 较平稳收敛
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 32 -lr 2e-4
REM 96.64%/42.80% 比 bs=32 更快收敛随后过拟合
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 64 -lr 2e-4
REM 97.84%/46.15% 比 bs=64 更快收敛随后过拟合
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 128 -lr 2e-4
REM 65.66%/37.38% 仍在上升,似乎lr太大
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 32 -lr 1e-3
REM 97.95%/45.72 与 lr=2e-4 基本一致且会反超,验证集收敛平稳 (*)
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 32 -lr 2e-5
REM 98.24%/41.92 后期过拟合
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 64 -lr 2e-5
REM 96.69%/45.64% 略逊于最佳设置
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 32 -lr 1e-5
REM 比 B=32 lr=4e-6 好一点,但似乎bs偏小
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 16 -lr 1e-5
REM 91.71%/47.11% 渐进 lr=2e-5 的情况,只是收敛慢
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 32 -lr 4e-6
REM 57.06%/43.57% 似乎lr太小
python train_baseline.py -M resnet50 -D Emotion6Dim6 -B 32 -lr 1e-6
:::::::::::::::::::::::
:: Multi-Task Net
:::::::::::::::::::::::
SET MODEL=resnet50
SET DATASETS=EmoSet Emotion6Dim7 Emotion6Dim6 Emotion6VA TweeterI
:train_linear
REM Step 1: refine a base ckpt with EmoSet (full weights)
python train.py -M %MODEL% -D EmoSet -lr 1e-4 --n_batch_train -1 --n_batch_valid -1
REM Step 2: train on mixed datasets (non-pretrained weights)
SET LOAD=
python train.py -L %LOAD% -M %MODEL% -D %DATASETS% -lr 0 4e-5 1e-4
REM Step 3: refine on mixed datasets (full weights)
SET LOAD=
python train.py -L %LOAD% -M %MODEL% -D %DATASETS% -lr 2e-6 -B 16
:train_mlp
REM Step 1: refine a base ckpt with EmoSet (full weights)
python train.py -H mlp -M %MODEL% -D EmoSet -lr 1e-4 --n_batch_train -1 --n_batch_valid -1
REM Step 2: train on mixed datasets (non-pretrained weights)
SET LOAD=lightning_logs\MTN-vit-mlp-backbone\checkpoints\epoch=10-step=32472.ckpt
python train.py -H mlp -L %LOAD% -M %MODEL% -D %DATASETS% -lr 0 4e-5 1e-4
REM Step 3: refine on mixed datasets (full weights)
SET LOAD=
python train.py -H mlp -L %LOAD% -M %MODEL% -D %DATASETS% -lr 2e-6 -B 16
:visualize_xweights
python vis.py -L "lightning_logs\MTN-r50-linear\checkpoints\epoch=13-step=2800.ckpt"
:visualize_interractive
python vis_gui.py -L "lightning_logs\MTN-r50-linear\checkpoints\epoch=13-step=2800.ckpt"
python vis_gui.py -L "lightning_logs\MTN-r50-mlp\checkpoints\epoch=9-step=2000.ckpt"