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

mu = tf.reshape(input_mu, shape=[1, 1, self.n_bins]) 这个操作有什么特殊意思吗? #3

Open
ChengjinLi opened this issue Nov 24, 2017 · 1 comment

Comments

@ChengjinLi
Copy link

K-NRM/knrm/model/model_knrm.py文件下的177行,mu = tf.reshape(input_mu, shape=[1, 1, self.n_bins])有什么特殊意义吗?在104行tmp = tf.exp(-tf.square(tf.sub(rs_sim, mu)) / (tf.mul(tf.square(sigma), 2))), 使用tf.sub这个api计算的时候,我测试用不用reshape结果是一样的。

@AdeDZY
Copy link
Owner

AdeDZY commented Nov 27, 2017

对,这句话可以删掉!是我在debug时为了确保tensor的shape是对的,才加上的。。

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