Closed MishanyaGeniyInformatiki closed 1 year ago
Sorry for the late reply. The compatible version of DIG for torch-geometric 2.0.4 is dive-into-graphs 1.0.0. Please refer to dig-stable
branch.
Please let me know if any questions.
OK, I installed dive-into-graphs 1.0.0, but the problem remains the same
Versions of installed packages: python 3.9.12 pytorch 1.11.0 torch-geometric 2.0.4 dive-into-graphs 1.0.0
Ok, I'll check this problem for GAT. Have you tried GCN or GIN?
Yes, I tried with GCN. Same problem. Perhaps the problem is that the gnn_lrp code is outdated, and the 'weight' attribute is no longer used in new versions of GATConv/GCNConv torch_geometric
Yes, I tried with GCN. Same problem. Perhaps the problem is that the gnn_lrp code is outdated, and the 'weight' attribute is no longer used in new versions of GATConv/GCNConv torch_geometric
Have you tried this example? PyG didn't do a good job on compatibility, so we used some patches to fix the problem. Indeed, the 'weight' attribute is no longer used in PyG, but we can add a 'weight' attribute pointing to the same address to make the code compatible with different versions of PyG.
No, I haven't tried this example, but I'm sure it will work. However, I could not train GCN_3l. Therefore, it is more convenient for me to use convolutional layers GCNConv, GATConv from the torch-geometric package. I note that I was able to create my own graph model using GCNConv, GATConv layers from the torch-geometric package and apply dig gnnexplainer to interpret the work. What can't be said about gnn_lrp
GNN LRP is a model-specific explainer due to its special back propagate nature; thus, I would recommend you using other explainers. If using GNN LRP is necessary, please refer to this GCNConv
. Wrapping the original GCNConv
with self.weight = self.lin.weight.data.T
is a possible solution.
Hi there! I use DIG. I'm trying to run a code gnn_lrp.py
Versions of installed packages: python 3.9.12 pytorch 1.11.0 torch-geometric 2.0.4 dive-into-graphs 0.2.0
But I get an error
Perhaps the problem is that the implementation of gnn_lrp is outdated and requires non-existent GATConv attributes from pytorch geometric 2.0.4?