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

max_sl 变量(用户点击序列的长度)在每个 batch 里都是不一样的值,模型结构在每个 batch 里是不固定的? #69

Open
lcshr123 opened this issue Feb 21, 2020 · 3 comments

Comments

@lcshr123
Copy link

想请教一下大佬, 代码里 max_sl 这个变量每个 batch 都会计算一遍。这样的话,每个 batch 里的 hist_i 这个变量的 shape 就是变化的,会引起后面的计算过程的 shape 也是变化的。 tensorflow 可以这样训练吗?
预测的时候,假设之前训练时的 max_sl 最大是 100, 新输入的数据的 max_sl 如果大于100,可以正确运行吗?

@YoungsonZhao
Copy link

同有这个疑问,求解答

@woon9zhai
Copy link

同问

@Melaniemod
Copy link

经过attention后hist_i 的size 变成 [B, 1, H] 的了[batch大小,1,embedding大小]

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

4 participants