Lin-Yijie / Graph-Matching-Networks

PyTorch implementation of Graph Matching Networks, e.g., Graph Matching with Bi-level Noisy Correspondence (COMMON, ICCV 2023), Graph Matching Networks for Learning the Similarity of Graph Structured Objects (GMN, ICML 2019).
Other
271 stars 55 forks source link

How can I input my own graph data and compare it? #6

Closed Lost-little-dinosaur closed 1 year ago

Lost-little-dinosaur commented 1 year ago

Hi I ran your train.py successfully, but I can't get an output and I want to use the script to compare my own graph data, how can I do? help me please~~.

Lost-little-dinosaur commented 1 year ago

and of course I gave you one star [doge]

Lin-Yijie commented 1 year ago

Hi~ You could construct your own dataset in train.py. The output of the model is exactly a graph representation as shown in 66 line of train.py.

Lost-little-dinosaur commented 1 year ago

image I saw that I got the training set and the verification set in line 33, but it seemed to generate a seed, it just specified the limit range of the generated graph, and then generated an iterator through the GraphEditDistanceDataset class pairs function instead of input a concrete graph. image

This is a little bit complicated for me, can you give me a concrete example where you input an adjacency matrix of two graphs, and you get an adjacency matrix of their similarity as an output? I would really appreciate it......

Lin-Yijie commented 1 year ago

Hi dinosaur~ In this repo, we give an example graph similarity learning task for synthesis graph data. It is highly expected to build your own graph dataset like GraphEditDistanceDataset. Similar to def _get_graph, you might use networkx package to change the adjacency matrix into the networkx like graph structure.

Lin-Yijie commented 1 year ago

@Lost-little-dinosaur Hi dinosaur. You could contact me with linyijie.gm@gmail.com

eleveneee commented 11 months ago

hi,bro Have you solved the problem of inputting your own graph? Also, how was your graph generated? Looking forward to your reply very much @Lost-little-dinosaur