forked from tech-srl/code2vec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train.sh
21 lines (19 loc) · 804 Bytes
/
train.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
###########################################################
# Change the following values to train a new model.
# type: the name of the new model, only affects the saved file name.
# dataset: the name of the dataset, as was preprocessed using preprocess.sh
# test_data: by default, points to the validation set, since this is the set that
# will be evaluated after each training iteration. If you wish to test
# on the final (held-out) test set, change 'val' to 'test'.
type=type
dataset_name=dataset
data_dir=data/${dataset_name}
data=${data_dir}/${dataset_name}
test_data=${data_dir}/${dataset_name}.val.c2v
model_dir=models/${type}
mkdir -p ${model_dir}
set -e
python -u code2vec.py --data ${data} --test ${test_data} --save ${model_dir}/saved_model
# pause on Windows
cmd /k