Skip to content

RuntimeError when running GATNet_E with gnnexplainer.py (mat1 and mat2 shapes cannot be multiplied) #7

@ddiem-ri-4D

Description

@ddiem-ri-4D

Hi @conghaowang ,

First of all, thank you for releasing this great tool — I’m currently exploring it for my research and learning purposes.

However, when I try to run the following command:

python3 gnnexplainer2.py -m 2

with the GATNet_E model, I encounter the following error:

Using CPU
Pre-processed data found: root_folder/root_028/processed/GDSC_test_mix.pt, loading ...
  0%|                                                                                                          | 0/33303 [00:00<?, ?it/s]
Traceback (most recent call last):
  ...
  File "/mnt/DATAR10/.../torch_geometric/nn/dense/linear.py", line 147, in forward
    return F.linear(x, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (95x1 and 4x3340)

It seems like the shape of edge_attr does not match the expected input for self.lin_edge inside GATConv.

Do you have any suggestions on what might be causing this mismatch, and how I could fix it?

Thank you very much for your help! 🙏

Best regards,
Mỹ Diễm

gnnexplainer2.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions