-
Notifications
You must be signed in to change notification settings - Fork 14
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
关于模型代码 #3
Comments
同样也发现了这两个问题,尤其是1会导致batch_size不同时,inference结果不同的情况。 |
抱歉,因为最近在忙别的工作,自己一直没有登录这个账号,没看到问题。 |
你好,模型代码里有两处地方不是很懂,可以帮忙看一下吗?
其中 res_last_out_w 的 shape 是 [batch_size, 100], res_last_out_b 是 [batch_size, 1],self.lin 的输入 tensor 的 shape 是 [batch_size, 100],这样 self.lin 的输出 tensor 的 shape 为 [batch_size, batch_size],是一个 shape 与 batch_size 相关的 tensor,这样如果 batch_size 为 1 的话,这个函数输出的 tensor 的 shape 就固定为 [1, 1],值也就固定为 1,这样等于主题网络部分输出一个固定为 1 的值,应该是有点问题?
这里的实现跟论文里说的似乎不一样?这里的做法应该是 value 的 similarity_map 除以归一化值的 similarity_map,而非论文里说的常规 attention 去掉 V。
The text was updated successfully, but these errors were encountered: