Extract embeddings #7728
Replies: 2 comments 7 replies
-
Your |
Beta Was this translation helpful? Give feedback.
-
Yes graphsage derived from basicgnn. that class is also implemented from torch.nn. I understood that the LinkNeighborLoader class generates the samples necessary to train the binary classification to see if there is an edge between the two nodes. I used this example to train the graphsage algorithm unsupervised way |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I train graphsage algorithm. I want to extract node embeddings
I wrote a simple embeder extraction class.
Are h_src and h_dst node embeddings?
data.edge_label_index[1] is this also the node_ids am I right?
I want to speed up my prediction speed
This is my base data loader method
This method have generate positive and negative samples so it will be slower
First I create pd dataframe which contains just nodes.
Because linkdataloader class have more than 20 million edge
But i have 1 million node
I dont want to predict each row
I just want to get the h_srcs and move forward
I fixed the target to 0, it doesn't matter which node it is connected to, only my first column will work.
Is my approach correct? is there an easier way to do this?
Beta Was this translation helpful? Give feedback.
All reactions