weihua916 / powerful-gnns

How Powerful are Graph Neural Networks?
MIT License
1.16k stars 223 forks source link

Custom dataset creation #4

Open acecreamu opened 5 years ago

acecreamu commented 5 years ago

Hi, thank you for such an impressive work. I would like to apply your algorithm to my task, so I need to create dataset which will fit your code. I have, say, 150 graphs of 200 nodes each, where all the nodes are equal.
I'm trying to understand your txt files, but have some issues with that. For example:

10 0
0 3 1 2 9
0 3 0 2 9
0 4 0 1 3 9
0 3 2 4 5
0 3 3 5 6
0 5 3 4 6 7 8
0 4 4 5 7 8
0 3 5 6 8
0 3 5 6 7
1 3 0 1 2

My assumption is that the block correspond to a graph, 10 is a number of nodes while 0 is a graph class label. Each row correspond to a node, where first value is a (node label I guess?), second is a number of links, and other are connections. Is that right? Is row number correspond to the node index?

kimsu55 commented 4 years ago

I reviewed the code, and I have a same opinion as you.

weihua916 commented 4 years ago

Hi! Thanks for your interest. GIN has been implemented by major libraries like Pytorch Geometric and DGL. The implementation is highly optimized and faster. I recommend using those libraries for your purpose. Those libraries also provide the same set of datasets as our work, so you should be able to easily reproduce our work using the libraries.

mdanb commented 3 years ago

@weihua916 Can you clarify the format for the files? I'm also wondering about this.

weihua916 commented 3 years ago

We directly adopted the dataset files from https://github.com/muhanzhang/pytorch_DGCNN/tree/master/data