How to use sample_from_edges #7721
Unanswered
LuisaWerner
asked this question in
Q&A
Replies: 1 comment
-
pyg has a RandomNodeLoader. You probably want a
Let me know if you need help making these updates to |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi,
my goal is to sample batches from a
Data
object based on theedge index
.I have a graph with node features [n x d] (in
data.x
) and edge index [2 x num_edges] (indata.edge_index
), I want to create batches based on the edges index so that each batch keeps the original featuresdata.x
as in the original object but a subset of the edges.The edges should be sampled subsequently. If the batch-size was 10, the first batch should have the first 10 batches in edge_index [2 x 10], the second batch the next 10 edges and so on.
Link_Neighbor_Loader
does not do what I want to achieve since I don't need any neighbors but the subsequent sampling of edges.Edge_Sampler_Input
looks like being close to what I want to do but I don't know how to usesample_from_edges
or how to overwrite it.Can someone help me with this problem?
Thanks in advance!
luisa
Beta Was this translation helpful? Give feedback.
All reactions