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

what is the meaning of the second parameter in dot([], [1, 1], name='context_vector') #37

Closed
Hessen525 opened this issue Feb 4, 2020 · 4 comments

Comments

@Hessen525
Copy link

Hi, Thanks for your awesome work.
I have a confusion about the code: context_vector = dot([hidden_states, attention_weights], [1, 1], name='context_vector')
What is the meaning of the second parameter?

@philipperemy
Copy link
Owner

Hey! Thank you! It means a lot to me. There's an explanation in this thread: #14
I plan to add a good and more exhaustive explanation to the README soon!

@Hessen525
Copy link
Author

No idea yet, is it that for permute? permute(1,1)?

@philipperemy
Copy link
Owner

@felixhao28 maybe you can answer that one.

@felixhao28
Copy link

The second argument is the axes to perform dot product. In this case it is equivalent to hidden_states * transpose(attention_weights)

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

3 participants