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

tks for your information, I don't know the cause of this error, so I added a little note for this issue in the readme #9

Open
luckystar1992 opened this issue Jul 31, 2022 · 2 comments

Comments

@luckystar1992
Copy link

tks for your information, I don't know the cause of this error, so I added a little note for this issue in the readme

Originally posted by @WeiNyn in #5 (comment)

@luckystar1992
Copy link
Author

Facing the same issue with > 4.2, now the issue is File "***/lib/python3.6/site-packages/transformers/trainer_pt_utils.py", line 48, in torch_pad_and_concatenate
if len(tensor1.shape) == 1 or tensor1.shape[1] == tensor2.shape[1]:
IndexError: tuple index out of range

In the forward() function of classifier.py, it returns a dict, which loss is a Tensor with shape 0. It leads the error above, so is there any good ways for that.

@luckystar1992
Copy link
Author

This error only appears in my mac mini m1, and I have changed to a Linux platform and it works, but have to set output_attentions and output_hidden_states to True in the classifier.py, it avoids two NoneType items in the final return

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