giannisnik / cnn-graph-classification Goto Github PK
View Code? Open in Web Editor NEWA convolutional neural network for graph classification in PyTorch
A convolutional neural network for graph classification in PyTorch
Hi @giannisnik ,
Could you please shed some light on why to append a zero row on top of Q_t?
Q_t = np.vstack([np.zeros(embedding_dim), Q_t])
# Line 154 in utils.py
Thanks.
Hi giannisnik,
Thanks for your kind sharing code!
Thanks!
Hi @giannisnik,
Seems the function orthogonal is not used in your code.
What is it for? Is it to accelerate the model training?
Br,
Hi there. Thank you for the code. In which line in the main.py file can I specify the dataset and the hyperparameters? When I run python main.py it gives me the error below:
Computing graph maps
Number of communities: 2594
Average size: 7.52
Traceback (most recent call last):
File "main.py", line 280, in
main()
File "main.py", line 62, in main
Q, subgraphs, labels, shapes = compute_nystrom(args.dataset, use_node_labels, args.d, args.community_detection, kernels)
File "/home/n/Documents/GDL/cnn-graph-classification/kcnn/utils.py", line 152, in compute_nystrom
model.fit(communities)
File "/home/n/Documents/GDL/cnn-graph-classification/kcnn/nystrom.py", line 30, in fit
basis_kernel = self.kernel(basis, basis, **self._get_kernel_params())
File "/home/n/Documents/GDL/cnn-graph-classification/kcnn/graph_kernels.py", line 111, in wl_kernel
if len(neighbors) > 0:
TypeError: object of type 'generator' has no len()
Thank you so much @giannisnik for publishing this code. Is a very interesting use of a CNN. I'm trying to reproduce some of your results but keep getting Accuracy = 0 measurements. Any thoughts on where to focus my debugging? Maybe related to the missing "best model"?
Hi giannisnik,
Thanks for your kind sharing code!
Can you give detailed code comments to help me learn?
And could you pls help explain what is the meaning below?
Epoch: [99] Avg accuracy 0.762; Average Loss 0.451; Avg Time x Batch 0.007
Thanks for sharing the code with us!
I am wondering how to handle categorical edges. For example, there are two types of edges in graphs among nodes, how coud I represent/identify type of a edge in graphs to feed graph kernel? Thanks!
Whenever I try to input a graph to the KCNN which only represents one graph (i.e. N = 1), then I get the error "ValueError: all the input array dimensions except for the concatenation axis must match exactly". What hyperparameter in main.py would I have to adjust to fix this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.