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

softmax of the attention vector #4

Open
batman47steam opened this issue Apr 4, 2022 · 0 comments
Open

softmax of the attention vector #4

batman47steam opened this issue Apr 4, 2022 · 0 comments

Comments

@batman47steam
Copy link

batman47steam commented Apr 4, 2022

attention_vector = torch.cat( [ self.conv_ex(Z).unsqueeze(dim=1), self.conv_ex(Z).unsqueeze(dim=1) ], dim=1)
attention_vector = self.softmax(attention_vector)
and self.softmax = nn.Softmax(dim=1)
it seems that the elements of the attention_vector are the same, so if you apply softmax on dim=1,the result of the softmax will all be the same, 0.5 for sure

so why are we doing this,i don't know if i have missed something

image

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