Cannot define a GATv2Conv layer for a Bipartite graph #3838
michalisfrangos
started this conversation in
General
Replies: 1 comment 1 reply
-
Which version of PyG are you using ( |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
From the description of GATConv and GATv2Conv they both support bipartite graphs and the layers can be instantiated in the same way. I cannot define a layer for a Bipartite graph with GATv2Conv. I was wondering if this is a bug in GATv2Conv?
Please see additional info below.
Thanks
M
Example with GATConv (all good):
gives a layer
GATConv((10, 10), 32, heads=1)
Example with GATv2Conv (error):
gives an error:
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_12336/3079787839.py in
----> 1 GATv2Conv(in_channels = (10,10),
2 out_channels = 32,
3 heads = 1, concat=True)
~\miniconda3\envs\env_gnn\lib\site-packages\torch_geometric\nn\conv\gatv2_conv.py in init(self, in_channels, out_channels, heads, concat, negative_slope, dropout, add_self_loops, bias, share_weights, **kwargs)
80 self.share_weights = share_weights
81
---> 82 self.lin_l = Linear(in_channels, heads * out_channels, bias=bias,
83 weight_initializer='glorot')
84 if share_weights:
~\miniconda3\envs\env_gnn\lib\site-packages\torch_geometric\nn\dense\linear.py in init(self, in_channels, out_channels, bias, weight_initializer, bias_initializer)
47 self.bias_initializer = bias_initializer
48
---> 49 if in_channels > 0:
50 self.weight = Parameter(torch.Tensor(out_channels, in_channels))
51 else:
TypeError: '>' not supported between instances of 'tuple' and 'int'`
Beta Was this translation helpful? Give feedback.
All reactions