代码拉取完成,页面将自动刷新
import argparse
from hgcn_utils.train_utils import add_flags_from_config
config_args = {
'training_config': {
'log': (None, 'None for no logging'),
'lr': (0.001, 'learning rate'),
'batch-size': (10000, 'batch size'),
'epochs': (500, 'maximum number of epochs to train for'),
'weight-decay': (0.005, 'l2 regularization strength'),
'momentum': (0.95, 'momentum in optimizer'),
'seed': (1234, 'seed for data split'),
'train_seed': (1234, 'seed for training'),
'log-freq': (1, 'how often to compute print train/val metrics (in epochs)'),
'eval-freq': (20, 'how often to compute val metrics (in epochs)'),
'r': (2., 'fermi-dirac decoder parameter for lp'),
't': (1., 'fermi-dirac decoder parameter for lp'),
'i': (1, 'the number of iteration times')
},
'model_config': {
'embedding_dim': (50, 'user item embedding dimension'),
'scale': (0.1, 'scale for init'),
'dim': (50, 'embedding dimension'),
'network': ('resSumGCN', 'choice of StackGCNs, plainGCN, resSumGCN'),
'c': (1, 'hyperbolic radius, set to None for trainable curvature'),
'num-layers': (4, 'number of hidden layers in encoder'),
'margin': (0.1, 'margin value in the metric learning loss'),
'alpha': (20, "scale factor for geometric regularization")
},
'data_config': {
'dataset': ('Amazon-CD', 'which dataset to use'),
'num_neg': (1, 'number of negative samples'),
'test_ratio': (0.2, 'proportion of test edges for link prediction'),
'norm_adj': ('True', 'whether to row-normalize the adjacency matrix'),
}
}
parser = argparse.ArgumentParser()
for _, config_dict in config_args.items():
parser = add_flags_from_config(parser, config_dict)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。