-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_MF.sh
53 lines (48 loc) · 1.64 KB
/
run_MF.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
ROOT="~/workspace/experiments";
data_key="ml-1m";
# data_key="amz_Movies_and_TV";
task_name="TopK";
METRIC="_NDCG@50";
device=0; # -1 if using cpu
model_name="MF";
BS=256;
LOSS="pairwisebpr";
NNEG=1;
DIM=32;
for LR in 0.0001 0.0003 0.00003
do
for REG in 1.0 0.1 0
do
python main.py\
--proctitle "Loki"\
--model ${model_name}\
--task ${task_name}\
--n_round 1\
--train_and_eval\
--seed 19\
--optimizer "Adam"\
--cuda ${device}\
--n_worker 4\
--epoch 30\
--batch_size ${BS}\
--lr ${LR}\
--val_sample_p 1.0\
--with_val \
--temper 6\
--stop_metric ${METRIC}\
--model_path ${ROOT}/${data_key}/models/f2rec_${model_name}_lr${LR}_reg${REG}_${LOSS}.pkl\
--loss ${LOSS}\
--l2_coef ${REG}\
--emb_size ${DIM}\
--data_file ${ROOT}/${data_key}/tsv_data/\
--user_meta_data ${ROOT}/${data_key}/meta_data/user.meta\
--item_meta_data ${ROOT}/${data_key}/meta_data/item.meta\
--user_fields_meta_file ${ROOT}/${data_key}/meta_data/user_fields.meta\
--item_fields_meta_file ${ROOT}/${data_key}/meta_data/item_fields.meta\
--user_fields_vocab_file ${ROOT}/${data_key}/meta_data/user_fields.vocab\
--item_fields_vocab_file ${ROOT}/${data_key}/meta_data/item_fields.vocab\
--n_neg ${NNEG}\
--n_neg_val 100\
> ${ROOT}/${data_key}/logs/f2rec_train_and_eval_${model_name}_lr${LR}_reg${REG}_loss${LOSS}.log
done
done