Comments (3)
我也有这样的疑惑,我一开始以为是经优化过后的公式,但是好像推不出来,而且我测试了两种结果并不一致
from reclearn.
这个代码我理解是不同特征相同领域向量相加,然后再进行不同领域之间交叉,和公式上的不太一样呢
from reclearn.
在求教二阶交叉信息的时候,embedding_lookup之后应该是一个batch,filed_num,field_num,k的矩阵, 后面做交叉之前为什么要做这一步的reduce_sum latent_vector = tf.reduce_sum(tf.nn.embedding_lookup(self.v, inputs), axis=1)
我理解的代码应该是这样的:
latent_vector = tf.nn.embedding_lookup(self.v, inputs) # (batch_size, field_num, field_num, k) for i in range(self.field_num): for j in range(i+1, self.field_num): second_order += tf.reduce_sum(latent_vector[:, i, j] * latent_vector[:, j, i], axis=1, keepdims=True)
我也是这里感觉不是很好理解,我看过其他代码实现:首先将每个feat映射到filed(但是这里作者应该是简化了,一个feat就当作是一个filed了),然后循环应该是按照feat走,而不是按照filed,实际取的时候需要注意到对方feat所在filed,然后对应取embedding。包括你写的和作者的循环都是以range(self.filed_num)走的,所以似乎都不太对。
from reclearn.
Related Issues (20)
- [tf2.7]SASRec模型运行出错 HOT 2
- Caser数据维度报错
- Deemfm中关于fm的问题 HOT 1
- ml-1m数据集网盘地址挂了 HOT 1
- 跪求复现Behavior Sequence Transformer for E-commerce Recommendation in Alibaba!
- deepfm模型 HOT 1
- 希望添加双塔模型到库中 HOT 1
- 请问使用的Steam和Beauty是哪里下载的,是否需要自己先处理
- deepfm模型数据处理问题
- DIN模型在哪儿?没找到啊? HOT 1
- 关于PNNconcat的问题。 HOT 1
- deepfm模型mlp层输出shape的bug HOT 2
- 关于movielens数据集中正负样本处理的问题
- SASrec输入Incompatible shapes
- dssm怎么使用模型预测获取用户和物品的embeddings HOT 1
- AFM复现疑问
- Youtube DNN推断时使用的应该是output embedding,而非input embedding
- SASRec Mask的疑问
- 数据集不见了 HOT 1
- WND训练应该有点问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reclearn.