forked from miziha-zp/BiuG-XMRec-WSDMCup22
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parse.py
48 lines (44 loc) · 2.53 KB
/
parse.py
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
'''
Created on Mar 1, 2020
Pytorch Implementation of LightGCN in
Xiangnan He et al. LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation
@author: Jianbai Ye ([email protected])
'''
import argparse
def parse_args():
parser = argparse.ArgumentParser(description="Go lightGCN")
parser.add_argument('--bpr_batch', type=int,default=2048,
help="the batch size for bpr loss training procedure")
parser.add_argument('--recdim', type=int,default=2048,
help="the embedding size of lightGCN")
parser.add_argument('--layer', type=int,default=4,
help="the layer num of lightGCN")
parser.add_argument('--lr', type=float,default=0.001,
help="the learning rate")
parser.add_argument('--decay', type=float,default=1e-4,
help="the weight decay for l2 normalizaton")
parser.add_argument('--dropout', type=int,default=0,
help="using the dropout or not")
parser.add_argument('--keepprob', type=float,default=0.9,
help="")
parser.add_argument('--a_fold', type=int,default=100,
help="the fold num used to split large adj matrix, like gowalla")
parser.add_argument('--testbatch', type=int,default=100,
help="the batch size of users for testing")
parser.add_argument('--dataset', type=str,default='t1',
help="available datasets: [lastfm, gowalla, yelp2018, amazon-book]")
parser.add_argument('--path', type=str,default="./checkpoints",
help="path to save weights")
parser.add_argument('--topks', nargs='?',default="[20]",
help="@k test list")
parser.add_argument('--tensorboard', type=int,default=1,
help="enable tensorboard")
parser.add_argument('--comment', type=str,default="lgn")
parser.add_argument('--load', type=int,default=0)
parser.add_argument('--epochs', type=int,default=400)
parser.add_argument('--multicore', type=int, default=0, help='whether we use multiprocessing or not in test')
parser.add_argument('--pretrain', type=int, default=0, help='whether we use pretrained weight or not')
parser.add_argument('--seed', type=int, default=2020, help='random seed')
parser.add_argument('--model', type=str, default='lgn', help='rec-model, support [mf, lgn]')
parser.add_argument("--onlytest", help="reload pkl features", action='store_true')
return parser.parse_args()