ESIM icon indicating copy to clipboard operation
ESIM copied to clipboard

ESIM中Attention问题

Open showintime opened this issue 6 years ago • 0 comments

https://github.com/HsiaoYetGun/ESIM/blob/master/Model.py#L169

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

这里对attentionWeights进行transpose后,生成的张量的形状为 ( seq_length, seq_length, batch_size ) 然后在对上一步的结果进行softmax,tf.nn.softmax默认在最后一个维度作softmax, 那岂不是在batch上作softmax ?求相互指教。

showintime avatar Dec 09 '19 18:12 showintime