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

您好,请教一下代码实现的细节 #7

Closed
ithok opened this issue Apr 15, 2022 · 2 comments
Closed

您好,请教一下代码实现的细节 #7

ithok opened this issue Apr 15, 2022 · 2 comments

Comments

@ithok
Copy link

ithok commented Apr 15, 2022

您好,我刚看完了您的文章,目前在浏览paper实现的代码。
这里想和您确定一下NCL模型的输入的形式,是否是采取的random生成的方法?

self.user_embedding = torch.nn.Embedding(num_embeddings=self.n_users, embedding_dim=self.latent_dim)
self.item_embedding = torch.nn.Embedding(num_embeddings=self.n_items, embedding_dim=self.latent_dim)

以及如果是的话,采取这种输入的思路来源在哪里(因为我自己还是刚入门正方面不是很清楚?

望不吝赐教,非常感谢!

@hyp1231
Copy link
Member

hyp1231 commented Apr 15, 2022

嗯嗯是的,目前大部分关于 collaborative filtering 的研究,输入数据相当于只有 user 和 Item 的 ID,模型会为每个 ID 随机初始化一个 embedding 向量,作为模型参数逐渐训练。

来源可以参考 RecBole 中 General Recommendation 这类下的模型的实现以及对应的原论文。

@ithok
Copy link
Author

ithok commented Apr 17, 2022

好的,非常感谢您!

@hyp1231 hyp1231 closed this as completed Apr 19, 2022
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