Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问user feature和item feature是必须的吗? #5

Closed
ZikaiGuo opened this issue Jul 5, 2019 · 2 comments
Closed

请问user feature和item feature是必须的吗? #5

ZikaiGuo opened this issue Jul 5, 2019 · 2 comments

Comments

@ZikaiGuo
Copy link

ZikaiGuo commented Jul 5, 2019

作者您好!

我想将diffnet用在一些不带user feature和item feature的数据集上。我将每个用户和物品的feature都改为长度很短的零向量(例如[0,0,0,0,0])。按照论文里的公式,这样改动后user feature和item feature都不会起作用,而社交信息依然能起作用。但我做了这样以后会导致训练时train loss、val loss、test loss均为nan,模型无法正常训练。

请问我这样来去掉额外的feature信息是否可行?您是否试过把diffnet修改后用在不带user feature、item feature的数据集上? 谢谢!

@PeiJieSun
Copy link
Owner

你好,这样子去掉额外的feature是不可行的,因为0的存在,使得模型在反向传播训练时,导致梯度出现nan值。

去掉额外的feature的方法是:
在diffnet.py文件中,
第98行,修改为:
self.final_item_embedding = self.fusion_item_embedding = self.item_embedding
第107行,修改为:
self.fusion_user_embedding = self.user_embedding

@ZikaiGuo
Copy link
Author

ZikaiGuo commented Jul 6, 2019

太感谢了!谢谢您!

@ZikaiGuo ZikaiGuo closed this as completed Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants