MCPcopy Index your code
hub / github.com/PyGCL/PyGCL / GConv

Class GConv

examples/GRACE.py:16–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15
16class GConv(torch.nn.Module):
17 def __init__(self, input_dim, hidden_dim, activation, num_layers):
18 super(GConv, self).__init__()
19 self.activation = activation()
20 self.layers = torch.nn.ModuleList()
21 self.layers.append(GCNConv(input_dim, hidden_dim, cached=False))
22 for _ in range(num_layers - 1):
23 self.layers.append(GCNConv(hidden_dim, hidden_dim, cached=False))
24
25 def forward(self, x, edge_index, edge_weight=None):
26 z = x
27 for i, conv in enumerate(self.layers):
28 z = conv(z, edge_index, edge_weight)
29 z = self.activation(z)
30 return z
31
32
33class Encoder(torch.nn.Module):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected