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输入历史行为序列不定长问题 #75

Open
ae2leowen opened this issue May 9, 2019 · 4 comments
Open

DIN输入历史行为序列不定长问题 #75

ae2leowen opened this issue May 9, 2019 · 4 comments
Labels

Comments

@ae2leowen
Copy link

Describe the question(问题描述)
你好,作为新手,非常感谢贡献
在用自己数据跑DIN时候,数据处理后输入的历史行为不定长,比如输入是(分别为用户id,用户性别,广告 id,广告分类,用户点击的历史广告id,用户点击的历史广告的分类)
uid,ugender,iid,icate,hist_iid,hist_icate
13,1,24,3,[1,7],[2,5]
13,1,13,1,[1,7,24],[2,5,3]

如上按时间对历史行为排序后取一个用户的连续两次记录,这样两笔记录的历史列则不等长,当输入到模型时候会报:
image

尝试用加padding的方式将记录扩充到等长序列,虽然模型可以成功跑起来,但这样会导致输入数据极速扩大,且有用的信息却没有变,该如何处理历史序列不等长的输入?

Operating environment(运行环境):

  • python version [e.g. 3.6]
  • tensorflow version [e.g. 1.10.0,]
  • deepctr version [e.g. 0.3.3,]
@shenweichen
Copy link
Owner

你好,这个目前处于简化使用的目的对于序列特征需要输入定长的数组,后面可能会改成字符串格式的输入。

@yuanzhiyu
Copy link

你好,这个目前处于简化使用的目的对于序列特征需要输入定长的数组,后面可能会改成字符串格式的输入。

一年多了,该改了,最好能自动构造历史行为序列(dog 哈哈哈

@lonngxiang
Copy link

现在是什么情况呢,是需要填充0后面吗

@HuipengXu
Copy link

现在可以支持batch内最大长度吗,maxlen设置为None可以吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants