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

AFM的实现中特征交叉层只用了一部分的特征做特征交叉 #7

Open
himiko14122 opened this issue Dec 30, 2021 · 1 comment

Comments

@himiko14122
Copy link

您好,我看了AFM的实现代码,在layer.py中第70行将输入划分为dense_inputs和sparse_inputs,但是在后续的interaction_layer中只使用了sparse_inputs的embedding来做特征交叉,dense_inputs在后续的流程中完全没有用到,这里不是应该将dense_inputs和sparse_inputs的embedding都用来做特征交叉吗?

@jc-LeeHub
Copy link
Owner

您好,我看了AFM的实现代码,在layer.py中第70行将输入划分为dense_inputs和sparse_inputs,但是在后续的interaction_layer中只使用了sparse_inputs的embedding来做特征交叉,dense_inputs在后续的流程中完全没有用到,这里不是应该将dense_inputs和sparse_inputs的embedding都用来做特征交叉吗?

要让dense_inputs也参与交叉的话,需要先做embedding,维度跟sparse_inputs的embedding保持一样,然后concat在一起做特征交叉即可。

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