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

Class GConv

examples/GBT.py:16–29  ·  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):
18 super(GConv, self).__init__()
19 self.act = torch.nn.PReLU()
20 self.bn = torch.nn.BatchNorm1d(2 * hidden_dim, momentum=0.01)
21 self.conv1 = GCNConv(input_dim, 2 * hidden_dim, cached=False)
22 self.conv2 = GCNConv(2 * hidden_dim, hidden_dim, cached=False)
23
24 def forward(self, x, edge_index, edge_weight=None):
25 z = self.conv1(x, edge_index, edge_weight)
26 z = self.bn(z)
27 z = self.act(z)
28 z = self.conv2(z, edge_index, edge_weight)
29 return z
30
31
32class Encoder(torch.nn.Module):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected