divelab / DIG

A library for graph deep learning research
https://diveintographs.readthedocs.io/
GNU General Public License v3.0
1.87k stars 283 forks source link

GradCAM on freesolv dataset #72

Closed boma-dirgantara closed 2 years ago

boma-dirgantara commented 2 years ago

Hi DIG maintainers,

I have tried to train GIN_3l on freesolv dataset with regression task. But it seems the model will not learn. So my question is, can I use freesolv dataset for GradCAM? if yes could you share the checkpoint for GIN_3l model?

Thanks in advance, Boma

Oceanusity commented 2 years ago

I haven't try the freesolv dataset yet, and I think I won't provide such checkpoint recently.

As an advice, how about trying gradient clipping during the training?

boma-dirgantara commented 2 years ago

Okay thanks @Oceanusity the model is now learned.

If I may post the following question. As I train using regression task, I assume num_classes=1 and for collect_data become x_collector.collect_data(masks, related_preds) in cell 7 so that it not trigger key, value in related_preds[label].items(): in line 158. But all result of related_prediction give the same number for 'zero': 1.0, 'masked': 1.0, 'maskout': 1.0, 'origin': 1.0. Is it true that the graph not being explained? because as I run further the example code the Fidelity and Fidelity_inv give both the result 0.0000

Oceanusity commented 2 years ago

I don't get the idea. In fact, all the methods are applied on classification problem now.

boma-dirgantara commented 2 years ago

I see. Thanks for the Info @Oceanusity . I thought because the target value from freesolv dataset is floating number it should use regression task