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

R-GCN RuntimeError: Found dtype Long but expected Float #13

Closed
Qidong-Liu opened this issue Nov 14, 2020 · 1 comment
Closed

R-GCN RuntimeError: Found dtype Long but expected Float #13

Qidong-Liu opened this issue Nov 14, 2020 · 1 comment

Comments

@Qidong-Liu
Copy link

Dataset: Yelp

Supervised = 'True'

Traceback (most recent call last):
File "src/main.py", line 188, in
main(args)
File "src/main.py", line 94, in main
if args.supervised=='True': loss = model.get_supervised_loss(pred, matched_labels, matched_index, multi)
File "/home/lqd/code/HNE-master/Model/R-GCN/src/model.py", line 142, in get_supervised_loss
predict_loss = F.binary_cross_entropy(torch.sigmoid(embed[matched_index]), matched_labels)
File "/home/lqd/software/anaconda3/envs/HNE/lib/python3.7/site-packages/torch/nn/functional.py", line 2526, in binary_cross_entropy
input, target, weight, reduction_enum)
RuntimeError: Found dtype Long but expected Float

@xiaoyuxin1002
Copy link
Collaborator

Thanks for bringing it out! The bug has been fixed.

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