-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: GCNConv
in to_hetero
with single node type
#4271
Comments
In general, |
Thanks, I just found the problem. The forward pass of my model had an if clause that checked if edge_weight is None:
which obviously tripped
However, if I change the forward pass of my model to
it works and the three lines regarding the edge_weight are gone. However, now I run into the
Problem because I use GCN layers in a heterogeneous setting. I thought it should work since I have only one node type, but apparently it doesnt. |
This is definitely a bug. I will try to fix it. |
GCNConv
in to_hetero
with single node type
I just fixed this in #4279 :) |
Thanks :) |
I am still getting the same bug "AttributeError: 'tuple' object has no attribute 'size'" with the GCNConv
Doesn't happen when I switch to GATConv |
Yes, you can only use HeteroConv({
...
('movie', 'is_similar', 'movie'): GCNConv(...),
...
}) This is a limitation of |
Thanks, I did not get that. |
@rusty1s is this just a matter of code implementation or theoretically it cannot be applied in such scenarios? |
I would say it is just a limitation of the operator. In particular since
|
🐛 Describe the bug
I just started using heterogeneous graphs, so far I have roughly 1 year experience with homogeneous graphs using your library. I have a graph with just 1 node type ("gene") but multiple edge types between the nodes. My HeteroData object prints as follows:
I convert my GCN-based model (that runs fine with a homogeneous Data object) using the
to_hetero()
function.I then pass my data into the model as follows:
where
data
is the HeteroData Object described above.However, I get an error and I think it is because it expects
edge_weight
somewhere:Do I have to specify edge weights in heterogeneous graphs? The Documentation doesnt mention it.
It is weird that the traceback does mention only torch packages and not torch_geometric.
Cheers and thanks,
Florin
Environment
conda
,pip
, source): condatorch-scatter
): torch_scatter: 2.0.8The text was updated successfully, but these errors were encountered: