Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why do query-masking after softmax? #54

Closed
HaishuoFang opened this issue Oct 18, 2018 · 0 comments
Closed

why do query-masking after softmax? #54

HaishuoFang opened this issue Oct 18, 2018 · 0 comments

Comments

@HaishuoFang
Copy link

query_masks = tf.sign(tf.abs(tf.reduce_sum(queries, axis=-1))) # (N, T_q)

This masking can do before softmax, just like key masking,why do this operation after softmax? I cannot understand

@HaishuoFang HaishuoFang changed the title query masking can do before softmax? why do query-masking after softmax? Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant