-
Notifications
You must be signed in to change notification settings - Fork 2
/
pretrain_cim_base.sh
executable file
·42 lines (38 loc) · 1.05 KB
/
pretrain_cim_base.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
#!/bin/bash
#export CUDA_VISIBLE_DEVICES=0,1,2,3
exp_base="cim_base"
dataset=mimic_synthetic
dict_file=data/lexicon/lexicon.json
mimic_csv_dir=data/mimic3/split
data_dir=data/$dataset
output_dir=results/$exp_base
# Decoding for eval
length_penalty=1.0
beam_sort_linear_ed="beam_sort_ed"
beam_final_score_normalize_ed="beam_final_score_normalize_ed"
edit_distance_weight=5.0
python run.py \
--mimic_csv_dir=$mimic_csv_dir \
--data_dir=$data_dir \
--bert_dir=bert/ncbi_bert_base \
--dict_file=$dict_file \
--output_dir=$output_dir \
--is_train \
--dropout=0.1 \
--decoder_layers=12 \
--train_bert \
--bert_finetune_factor=0.1 \
--batch_size=256 \
--num_gpus=4 \
--num_beams=3 \
--edit_distance_weight=$edit_distance_weight \
--length_penalty=$length_penalty \
--$beam_sort_linear_ed \
--$beam_final_score_normalize_ed \
--dict_matching \
--training_step=500000 \
--display_iter=100 \
--eval_iter=25000 \
--lr 0.0001 \
#--init_ckpt=$output_dir/ckpt.pkl \
#--init_step=100000