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

A Problem About Embed #12

Open
pydxflwb opened this issue Sep 11, 2020 · 0 comments
Open

A Problem About Embed #12

pydxflwb opened this issue Sep 11, 2020 · 0 comments

Comments

@pydxflwb
Copy link

loader size 1
training model
Traceback (most recent call last):
File "EANN.py", line 558, in
main(args)
File "EANN.py", line 317, in main
class_outputs, domain_outputs = model(train_text, train_image, train_mask)
File "C:\Users\15821\anaconda3\envs\python36\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "EANN.py", line 156, in forward
text = self.embed(text)
File "C:\Users\15821\anaconda3\envs\python36\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "C:\Users\15821\anaconda3\envs\python36\lib\site-packages\torch\nn\modules\sparse.py", line 114, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "C:\Users\15821\anaconda3\envs\python36\lib\site-packages\torch\nn\functional.py", line 1724, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got torch.cuda.IntTensor instead (while checking arguments for embedding)

Thanks for your work! And I'm confused what type of data the "text" data should be converted into.

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