divelab / DIG

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

The returned fidelity is NAN #199

Closed TimelessXZY closed 1 year ago

TimelessXZY commented 1 year ago

I have upgraded my DIG version to 1.1.0 now. When I use the given explaining demo of GNNExplainer ( https://github.com/divelab/DIG/blob/dig-stable/examples/xgraph/gnnexplainer.ipynb ), the given dataset 'ba_shapes', the given model 'GIN' and the given checkpoint 'GIN_2l_best', the output fidelity result is NAN which is not in line with the given result of fidelity 0.4682. I have also tried model GCN, which had the same issue.

After debugging, I found that the masked_pred and maskout_pred were somehow all NANs.

CM-BF commented 1 year ago

This is caused by the missing of sigmoid function before using the masks. I have fixed it and updated the repo. Please reopen and let me know if there are any further questions. :smile: