Graclus Issue #4621
Unanswered
yikang7720
asked this question in
Q&A
Graclus Issue
#4621
Replies: 1 comment 2 replies
-
Can you share your |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
Hi,
I find a bug exists when I am using the graclus function with weight. This is the code of the graclus network for graph classification. However, I find that if I set the weight of the graclus function as my data weight. The network will run all the time and no results or accuracy provided.
Here is the my Data.
Data(edge_index=[2, 13456], weight=[13456], num_nodes=116, x=[116, 1], y=0).
Here is the code for the graclus network.
`import torch
import torch.nn.functional as F
from torch.nn import Linear
from torch_geometric.data import Batch
from torch_geometric.nn import (
GraphConv,
JumpingKnowledge,
global_mean_pool,
graclus,
max_pool,
)
num_layers = 4
hidden = 16
class Graclus(torch.nn.Module):
def init(self):
super(Graclus, self).init()
self.conv1 = GraphConv(1, 16, aggr='mean')
self.convs = torch.nn.ModuleList()
for i in range(num_layers - 1):
self.convs.append(GraphConv(16, 16, aggr='mean'))
self.jump = JumpingKnowledge(mode='cat')
self.lin1 = Linear(64, 16)
self.lin2 = Linear(16, 1)
Beta Was this translation helpful? Give feedback.
All reactions