AdeDZY / K-NRM

K-NRM: End-to-End Neural Ad-hoc Ranking with Kernel Pooling
BSD 3-Clause "New" or "Revised" License
202 stars 43 forks source link

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

Open ChengjinLi opened 6 years ago

ChengjinLi commented 6 years ago

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 commented 6 years ago

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