Making a custom Dataset
See original GitHub issue❓ Questions & Help
Hello all, I am fairly new to pytorch_gemoetric and this might be a noob question. I have an numpy ndarray of shape [22, 313] and I want to represent it as a graph, with 22 nodes connected to each other correlation between channels as edge weight.
Using networkx, I create the graph and weight matrices and finally-
data_g = from_networkx(G) data_final = Data(x=data, edge_index=data_g.edge_index, edge_attr=data_g.weight)
Is this the correct way to go…
Thanks in Advance
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Creating a custom Dataset and Dataloader in Pytorch - Medium
Creating a custom Dataset and Dataloader in Pytorch · The Torch Dataset class is basically an abstract class representing the dataset. · The...
Read more >Writing Custom Datasets, DataLoaders and Transforms
torch.utils.data.Dataset is an abstract class representing a dataset. Your custom dataset should inherit Dataset and override the following methods:.
Read more >How to Create a Custom Dataset - Dataiku Knowledge Base
Create the custom dataset¶ · Choose Dataset · Select Python as the language · Give the new dataset type an id, like raas...
Read more >Writing custom datasets - TensorFlow
Add an entry for your dataset into DATASET_EXTRAS in setup.py . This makes it so that users can do, for example, pip install...
Read more >Custom dataset in Pytorch —Part 1. Images | by Utkarsh Garg
Let's Code · 1. Import Libraries · 2. Define Transforms · 3. Create Train, Valid, and Test sets · 4. Create index_to_class and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s correct. The easiest way to achieve that is to just pass a list of
Data
objects to theDataLoader
(with.data.y
set for each).Hi @rusty1s , I did that (return seperately) in
get
method, not__getitem__
and I got the error mentioned in the starting of the post. But when I added separate data intoData
object usingget
method, I was not getting any error. May be should also check this__getitem__
method.Thanks Srikanth