Issue with Heterogenous Graph embedding (GraphSage) #8987
Unanswered
Charles-Ca
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Thanks for the wonderful framework, i'm excited to learn the capabilities of PyG
I'm a beginner in Pytorch and PyG
I'm trying to do a simple exemple with Heterogenous data, i read a lot of Q&A and search in the documentation but i was not able to find exactly what's wrong in what i trying to do.
Based on : #8380
I'm trying to create an embedding for the item nodes
i'm using the following code :
So you can note here i add some feature to the transactions with the amout
Converting the toys datasets to graph :
Sampling
Definition of the model
I'm getting over and over :
z_dict = self.encoder(x_dict, edge_index_dict) <--- Here i get the main issue is in the encoder part, during the forward process (In GNN class)
--> 11 conv1__item = self.conv1.user__buy__item((x__user, x__item), edge_index__user__buy__item)
return F.linear(x, self.weight, self.bias)
RuntimeError: expected m1 and m2 to have the same dtype, but got: long int != float
don't understand why i have some type issue, they all got the same type when i inspect the tensor i created, they have all the same type (For exemple data['user'].x.dtype)
i tried something like .to(torch.[specific_dtypes]) but it didn't resolve the issue
I'm trying to run an exemple to understand the working end-to-end and playing around then
Thanks for you help
Versions
PyG==2.5.0
Torch==2.1.2
Python==3.10
Beta Was this translation helpful? Give feedback.
All reactions