Chong Chen

Results 68 comments of Chong Chen

Of course! what's your email address?

Ok, we have sent the email. If you have any questions, please feel free to ask me.

Hi, thank you for your interest in our work! 为了说的清楚点,也节省时间,我直接用中文解答一下吧, 1、max_user_pi,是对于每个商品,最多的交互用户的数量;max_relation_pi是对于每个商品最多的交互关系数量。因为tensorflow中的输入需要是一个对齐的tensor, 所以我们输入的每个训练batch的shape为 [batch_size, max_user_pi],对于数量不足的商品,我们用“self.n_users”补齐。 2、因为我们的输入tensor是补齐的,所以首先用 tf.cast(tf.not_equal(self.input_iu, self.n_users)操作来所补得“self.n_users”置为0,这样就不会被更新计算到。 3、这两种计算attention的方法基本上没啥区别,可以互换。

一般情况下大家不对预测层进行L2约束,所以加不加都可以,我们在这篇文章中基本上是用dropout来防止过拟合的,所以L2在这个工作里影响不大

你好,更换数据集需要更改两个地方,一个是Main_JNSKR.py代码里,另一个是utility下的parser.py里: parser.add_argument('--dataset', nargs='?', default='amazon-book', help='Choose a dataset from {yelp2018, last-fm, amazon-book}')

首先,对于权重的设置,我们发现用item-baseed跟用常数带来的差异并不是很大,而且在这里上传常数是因为这样更方便安别人用的时候更好调参,不然的话参数更多,有c0,和p,更换数据集的话别人更不容易调出好的结果。该部分代码为: def caculate_weight(c0,p,train_set, train_len): m=[0] * len(train_set.keys()) for i in train_set.keys(): m[i]=len(train_set[i])*1.0/train_len c=[0] * len(train_set.keys()) tem=0 for i in train_set.keys(): tem += np.power(m[i],p) for i in train_set.keys(): c[i]=c0*np.power(m[i],p) / tem...

self.iidW denotes the embedding vectors of all the items.