Exclude last layer from StellarGraph's models for the graph classification task and add a local maxpooling layer #2049
Unanswered
redrocket8
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to build a binary graph classification model.
Each of my samples is an undirected graph with 28 nodes, 1 feature for each node (a pixel value ) and the same adjacency matrix.
So far I have managed to import my Dataset using the PaddedGraphGenerator and use different models like DeepGraphCNN
and GCNSupervisedGraphClassification in order to get the feeling of the implementation .
The problem that I am trying to solve is the following:
In the case of GCNSupervisedGraphClassification the last layer is a GlobalAveragePooling1D which, if my understanding is correct, averages the features of the whole graph
and in the case of DeepGraphCNN the last layer is a SortPooling layer which sorts the elements of the last layer.
What I would like ideally to do is apply some GCN layers on the graph then substitute each node's feature with the maximum feature from the neighborhood of the node (the analogous of max pooling in CNNs) by utilizing the graph's connectivity from adjacency matrix then apply one more GCN layers and finally feed the binary classifier (MLP or using 1D convolutions like in the demo example of DeepGraphCNN.
In sort words build something that is analogous to a CNN architecture for image classification.
I have tried to use the GCN class but it is only for FullBatchNodeGenerator.
So my questions are the following:
Please give me some guidelines , the most of the tutorials I have found are for node classification which doesn't fit to my problem.
Thanks in advance,
and sorry for the long text : )
Beta Was this translation helpful? Give feedback.
All reactions