-
Notifications
You must be signed in to change notification settings - Fork 0
/
train.sh
executable file
·52 lines (45 loc) · 5.21 KB
/
train.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
#!/usr/bin/env bash
export PYTHONPATH=PYTHONPATH:$PWD
## ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
# independent training
# model gtssg_sep_self_att_sep_vv1
# 1. fixed learning rate=5e-5
func_train_sepself_att_sep_v2_b50() #batch_size=50
{
python train_paired_mt.py --caption_model gtssg_sep_self_att_sep_vv1 --batch_size 50 --accumulate_number 2 --use_ssg 1 --use_isg 0 --freeze_i2t 0 --use_batch_norm 0 \
--input_fc_dir data/cocobu_fc --input_att_dir data/cocobu_att --input_ssg_dir data/aic_process/ALL_11683_v3_COCOCN_spice_sg_t5 \
--input_json data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5.json --input_label_h5 data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5_label.h5 --ssg_dict_path data/aic_process/ALL_11683_v3_COCOCN_spice_sg_dict_t5.npz_revise.npz \
--learning_rate 5e-5 --learning_rate_decay_start -1 --scheduled_sampling_start 0 --learning_rate_decay_every 5 \
--save_checkpoint_every 1000 --language_eval 1 --beam_size 5 --val_images_use 5000 --max_epochs 80 \
--checkpoint_path save --train_split train --gpu 0 --self_critical_after 1000000 --seq_per_img 1
}
# 1.fixed learning lr=5e-5 en
func_train_sepself_att_sep_v2_b50_en() #batch_size=50
{
python train_paired_mt_en.py --caption_model gtssg_sep_self_att_sep_vv1 --batch_size 50 --accumulate_number 2 --use_ssg 1 --use_isg 0 --freeze_i2t 0 --use_batch_norm 0 \
--input_fc_dir data/cocobu_fc --input_att_dir data/cocobu_att --input_ssg_dir data/aic_process/ALL_11683_v3_COCOCN_spice_sg_t5_en_dict2 \
--input_json data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5_en.json --input_label_h5 data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5_en_label.h5 --ssg_dict_path data/aic_process/ALL_11683_COCOCN_en_v3_spice_sg_dict_t5.npz_revise.npz \
--learning_rate 5e-5 --learning_rate_decay_start -1 --scheduled_sampling_start 0 --learning_rate_decay_every 5 \
--save_checkpoint_every 1000 --language_eval 1 --beam_size 5 --val_images_use 5000 --max_epochs 80 \
--checkpoint_path save --train_split train --gpu 0 --self_critical_after 100000 --seq_per_img 1 --p_flag 0
}
## ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
# 1. zh/fixed learing rate=5e-5
# with data_aug
{
python train_paired_mt.py --caption_model gtssg_sep_self_att_sep_vv1 --batch_size 50 --accumulate_number 2 --use_ssg 1 --use_isg 0 --freeze_i2t 0 --use_batch_norm 0 \
--input_fc_dir data/cocobu_fc --input_att_dir data/cocobu_att --input_ssg_dir data/aic_process/ALL_11683_v3_COCOCN_spice_sg_t5_aug \
--input_json data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5.json --input_label_h5 data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5_label.h5 --ssg_dict_path data/aic_process/ALL_11683_v3_COCOCN_spice_sg_dict_t5.npz_revise.npz \
--learning_rate 5e-5 --learning_rate_decay_start -1 --scheduled_sampling_start 0 --learning_rate_decay_every 5 \
--save_checkpoint_every 1000 --language_eval 1 --beam_size 5 --val_images_use 5000 --max_epochs 80 \
--checkpoint_path save --train_split train --gpu 0 --self_critical_after 1000000 --seq_per_img 1
}
#en/fixed learing rate=5e-5,
{
python train_paired_mt_en.py --caption_model gtssg_sep_self_att_sep_vv1 --batch_size 50 --accumulate_number 2 --use_ssg 1 --use_isg 0 --freeze_i2t 0 --use_batch_norm 0 \
--input_fc_dir data/cocobu_fc --input_att_dir data/cocobu_att --input_ssg_dir data/aic_process/ALL_11683_v3_COCOCN_spice_sg_t5_en_dict2_aug \
--input_json data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5_en.json --input_label_h5 data/aic_process/cocobu_ALL_11683_v3_COCOCN_t5_en_label.h5 --ssg_dict_path data/aic_process/ALL_11683_COCOCN_en_v3_spice_sg_dict_t5.npz_revise.npz \
--learning_rate 5e-5 --learning_rate_decay_start -1 --scheduled_sampling_start 0 --learning_rate_decay_every 5 \
--save_checkpoint_every 1000 --language_eval 1 --beam_size 5 --val_images_use 5000 --max_epochs 80 \
--checkpoint_path save --train_split train --gpu 0 --self_critical_after 100000 --seq_per_img 1 --p_flag 1
}