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

din模型问题 #128

Closed
langzhining opened this issue Oct 22, 2020 · 3 comments
Closed

din模型问题 #128

langzhining opened this issue Oct 22, 2020 · 3 comments

Comments

@langzhining
Copy link

Describe the bug(问题描述)
1 din.py文件forward 中keys length为常数1,不表示序列长度
2 部分sparse fear特征取了两次,lookup embedding中mask feature list不起作用

To Reproduce(复现步骤)
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Operating environment(运行环境):

  • python version [e.g. 3.5, 3.6]
  • torch version [e.g. 1.1.0, 1.2.0]
  • deepctr-torch version [e.g. 0.1.0,]

Additional context
Add any other context about the problem here.

@zanshuxun
Copy link
Collaborator

非常感谢您细致地排查问题,我们会在近期的版本中对该问题进行修复,祝好!

zanshuxun added a commit that referenced this issue Oct 23, 2020
@zanshuxun
Copy link
Collaborator

Q1:
已修复,详见61b5775
参考了dien.py中获取历史序列长度的方式,输入数据需要增加behavior_length
暂未合并至master分支,可以先参考dev-zsx分支

Q2:
(1)【部分sparse fear特征取了两次】 您是指这两次吗:

sparse_embedding_list, dense_value_list = self.input_from_feature_columns(X, self.dnn_feature_columns,
self.embedding_dict)

dnn_input_emb_list = embedding_lookup(X, self.embedding_dict, self.feature_index, self.sparse_feature_columns, mask_feat_list=self.history_feature_list, to_list=True)

第一次取出来的sparse_embedding_list在后面确实没有用到,已优化

(2)【lookup embedding中mask feature list不起作用】
embedding_lookup函数中的mask_feat_list参数是用于hash的,详见DeepCTR。目前torch版还未加入hash,所以还没有用到。

zanshuxun pushed a commit that referenced this issue Dec 5, 2020
Add History callback 
Solve issues in #69, #87, #93, #128, #130 
Fix error in regularization for pytorch1.7, improve compatibility for old version
zanshuxun added a commit that referenced this issue Dec 5, 2020
Add History callback 
Solve issues in #69, #87, #93, #128, #130 
Fix error in regularization for pytorch1.7, improve compatibility for old version
@zanshuxun
Copy link
Collaborator

Hi, we have solved this issue in v0.2.4, please use pip install -U deepctr-torch to upgrade.

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