How to use DataLoader with simple dataset? #3257
-
Using DataLoader with simple Minimal reproducible example:
throws
Relevant library versions:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Dataloader expects a Dataset object not a Data object that's why you are getting an error. Dataloader merges multiple On the other hand if your goal is to sample a set of nodes for training/testing from a single graph check out NeigghborLoader. |
Beta Was this translation helpful? Give feedback.
-
You can also use a list of data instead
|
Beta Was this translation helpful? Give feedback.
Dataloader expects a Dataset object not a Data object that's why you are getting an error. Dataloader merges multiple
Data
objects in aDataset
and returns a minibatch. The idea here is if you have multiple graphs orData
objects in aDataset
this loader returns a subset of graphs as a singleData
object in a minibatch.On the other hand if your goal is to sample a set of nodes for training/testing from a single graph check out NeigghborLoader.