Open showintime opened 4 years ago
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 ?求相互指教。
https://github.com/HsiaoYetGun/ESIM/blob/master/Model.py#L169
这里对attentionWeights进行transpose后,生成的张量的形状为 ( seq_length, seq_length, batch_size ) 然后在对上一步的结果进行softmax,tf.nn.softmax默认在最后一个维度作softmax, 那岂不是在batch上作softmax ?求相互指教。