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

tensor dont match problem #119

Open
gmy1234 opened this issue Feb 21, 2024 · 0 comments
Open

tensor dont match problem #119

gmy1234 opened this issue Feb 21, 2024 · 0 comments

Comments

@gmy1234
Copy link

gmy1234 commented Feb 21, 2024

File "/Users/gmydl/opt/anaconda3/envs/deepke/lib/python3.8/site-packages/transformers/models/bert/modeling_bert.py", line 985, in forward
buffered_token_type_ids_expanded = buffered_token_type_ids.expand(batch_size, seq_length)
RuntimeError: The expanded size of the tensor (778) must match the existing size (512) at non-singleton dimension 1. Target sizes: [1, 778]. Tensor sizes: [1, 512]

你好 这个问题是因为什么?

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