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

对于tensornet,是否支持一个slot下多个feature,需要对该slot下的多个feature 求sum/mean pooling? #52

Open
jackyhawk opened this issue Jun 11, 2021 · 1 comment

Comments

@jackyhawk
Copy link

对于tensornet,是否支持一个slot下多个feature,需要对该slot下的多个feature 求sum/mean pooling?

比如一个itemId,可能有两个tag,tag_科比,tag_库里,需要在tag这个slot下的多个tag,做下pooling,作为这个slot(field)的输入

一个用户的tag兴趣,可能有 tag_湖人,tag_科比,tag_勇士,tag_库里,需要把需要在tag兴趣这个slot下的多个tag兴趣,做下pooling,作为这个slot(field)的输入

还是说,直接用TensorFlow自带的即可?
combiner_embed = tf.nn.embedding_lookup_sparse(self.embedding,sp_ids=idx, sp_weights=val, combiner='sum')

@zhangqianjin
Copy link

这个是支持的,我跟了下代码逻辑,一个slot下面的 feature的emb是通过tf自带的聚合,支持sum或者mean, 如果想取出一个slot下面的各个feature 的emb,需要额外的开发一小部分代码

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