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

tf中position #11

Open
lrx1213 opened this issue Dec 13, 2018 · 4 comments
Open

tf中position #11

lrx1213 opened this issue Dec 13, 2018 · 4 comments

Comments

@lrx1213
Copy link

lrx1213 commented Dec 13, 2018

position_ij = tf.concat([tf.cos(position_ij), tf.sin(position_ij)], 1)

论文中sin和cos是交叉的,偶数位置为sin,奇数位置为cos,如果按照你这么运算,前半部分是cos,后半部分是sin,是不是与论文不符,希望帮忙解惑,谢谢

@bojone
Copy link
Owner

bojone commented Dec 13, 2018

为什么要与原文相符?我这样就不合理了吗?

@bojone
Copy link
Owner

bojone commented Dec 13, 2018

#2

@lrx1213
Copy link
Author

lrx1213 commented Dec 14, 2018

为什么要与原文相符?我这样就不合理了吗?
没有这个意思,我只是在学习你的代码的时候发现与原文不符,就是确认一下,并没有说不合理的意思,当然,我觉得这样应该也可以

@bojone
Copy link
Owner

bojone commented Dec 14, 2018

我的意思也就是说合理就行,不一定拘泥于形式。何况我觉得,我这种形式不只是合理,而是完全等价于原来的形式。在#2 已经做了解释。

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