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 (6) must match the size of tensor b (18) at non-singleton dimension 0 #161

Closed
Pengxin-Guo opened this issue Jun 11, 2023 · 1 comment

Comments

@Pengxin-Guo
Copy link

 models/med.py
attention_scores = torch.matmul(query_layer, key_layer.transpose(-1, -2))

RuntimeError: The size of tensor a (6) must match the size of tensor b (18) at non-singleton dimension 0

Why is this error reported during the test phase when the training phase is normal?

@uestcMeng
Copy link

I encountered the same error, do you have any solution?

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

2 participants