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: Expected tensor for argument #1 'indices' to have scalar type Long #15

Closed
WenRichard opened this issue Jul 31, 2020 · 4 comments

Comments

@WenRichard
Copy link

I have to say that it's really a good job!I met some problem when I run the demo (Multilingual suggestions by RoBERTa ),I try to set language as English and Chinese,however they all fail to run,The reason is that “RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got torch.IntTensor instead (while checking arguments for embedding)” ,I have no idea how to solve it ,it disturb me a lot time,can you give me some suggestions? I will appreciate it,by a way,my Environment are as follows:

  1. torch==1.2.0
  2. torchvision==0.4.0
  3. tensorflow-gpu==1.13.2
    4.Python==3.6.1
@marcotcr
Copy link
Owner

I don't know what this is, but perhaps try updating your torch version?

@WenRichard
Copy link
Author

I don't know what this is, but perhaps try updating your torch version?

Thanks,Can you give me your detailed environment set?eg. torch version, python version, etc

@marcotcr
Copy link
Owner

marcotcr commented Aug 4, 2020

python 3.6.8
torch 1.5.1

@DavidHuebner
Copy link

DavidHuebner commented Feb 14, 2021

Hi, I just started with checklist and faced the same issue. Here is the error log:

error_log.txt

My versions:
python 3.8.5
torch==1.7.1
checklist==0.0.10

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

3 participants