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 to expand the 1-dim of response_vecs? #10

Open
llllly26 opened this issue Mar 1, 2022 · 0 comments
Open

why to expand the 1-dim of response_vecs? #10

llllly26 opened this issue Mar 1, 2022 · 0 comments

Comments

@llllly26
Copy link

llllly26 commented Mar 1, 2022

why you do this? responses_vec = responses_vec.view(1, batch_size, -1).expand(batch_size, batch_size, self.vec_dim)。in this way, the dimension of 'responses_vec' is (bs,bs,64).when calculate dot_attention that final_context_vec = dot_attention(responses_vec, context_vecs, context_vecs, None, self.dropout), attention_weights is (bs,bs,16).so when weighted,one query may gat the all information in batch,why? thanks!

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