zhiguowang / BiMPM

BiMPM: Bilateral Multi-Perspective Matching for Natural Language Sentences
Apache License 2.0
438 stars 150 forks source link

A little confusion about the tensor calculation in matching. #42

Open Chester-zZz opened 6 years ago

Chester-zZz commented 6 years ago

Hi, I like your work, and your code is decent. But I'm a little confused about the tensor calculation in matching. In match_utils.py, function multi_perspective_match:

mp_cosine_matching = layer_utils.cosine_distance(tf.multiply(repres1_flat, mp_cosine_params),
                                                             repres2_flat, cosine_norm=False)

Why only tf.multiply(repres1_flat, mp_cosine_params) , but not tf.multiply(repres2_flat, mp_cosine_params) as well ? In your paper, W is multiplied by both v1 and v2.

Looking forward to reply, thanks!