ESIM icon indicating copy to clipboard operation
ESIM copied to clipboard

inquiry on attention part

Open Derekkk opened this issue 6 years ago • 1 comments

Hi there,

Thanks for sharing the code. For attention part in model.py, your code is:

attentionSoft_b = tf.nn.softmax(tf.transpose(attentionWeights))
attentionSoft_b = tf.transpose(attentionSoft_b) 

while I feel like it should be: attentionSoft_b = tf.nn.softmax(attentionWeights, axis=1)

or you should indicate the "perm" in transpose function.

Please correct me if I'm wrong, thanks!

Derekkk avatar Jan 30 '19 19:01 Derekkk

u r right . tf.transpose() would trans all tha axis of the tensor. such as [4,3,2] ——>[2,3,4]

randomtutu avatar Feb 25 '19 09:02 randomtutu