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

RuntimeError: The size of tensor a (128) must match the size of tensor b (512) at non-singleton dimension 2 #3

Open
OmarMohammed88 opened this issue Feb 14, 2021 · 0 comments

Comments

@OmarMohammed88
Copy link

I followed your instructions and replaced class MultiheadAttenion with LinearMultiheadAttention and kept the seq_len 512 and proj_k 128, my configurations were as follow ( hidden dim 512, max_text length 512) .
After more Debuging i found that
attn_mask is torch.Size([1, 512, 512])
attn_output_weights torch.Size([64, 512, 128]) .

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