Closed kelvinleen closed 7 years ago
Very nice catch! Thank you! Do you want to submit a pull request? :)
Yes, this is same as what I found today! softmax before expand will makes all variable in matrix goes to 1.
thank u for reply so quickly. just submit a pull request. BTW: source code have change a lot compared to 2-weeks ago version. thx for ur code
in layers.py function pointer_net, i have some confusion in compute attention_pool: p1_logits = attention(inputs, Params.attn_size, weights_p, output_fn = None, scope = "attention") scores = tf.expand_dims(p1_logits, -1) scores = tf.nn.softmax(scores)
i think the softmax should compute before expand_dims, otherwise the softmax computes on the last dim which just one element makes score all 1s.
is anything i misunderstand?