mdeff / cnn_graph

Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
https://arxiv.org/abs/1606.09375
MIT License
1.34k stars 390 forks source link

Dose this project provide an interface for regression task? #9

Closed CaoQi92 closed 7 years ago

CaoQi92 commented 7 years ago

Hi, I have read the paper " Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering" and the usage notebook for figuring out the use of this models. But I find that the tasks in your paper and the usage notebook are all aiming for classification. Dose this project provide an interface for regression task? Or do I have to write this interface by myself?

Thanks.

mdeff commented 7 years ago

Hi, thanks for your interest. The actual code was not used for regression, but it's just a matter of changing the classification loss function in models.py to whichever loss matters to you. Now it looks like:

cross_entropy = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=logits, labels=labels)
cross_entropy = tf.reduce_mean(cross_entropy)
loss = cross_entropy + regularization

You probably won't need any coarsening either, just set the pooling sizes p to 0.

CaoQi92 commented 7 years ago

Thanks for answering. I will have a try.