MCPcopy Create free account
hub / github.com/TPCD/DCCL / __init__

Method __init__

model/meta_graph.py:17–32  ·  view source on GitHub ↗
(self, device, hidden_dim, sparse_inputs=False, act=nn.Tanh(), bias=True, dropout=0.6)

Source from the content-addressed store, hash-verified

15
16class GraphConvolution(nn.Module):
17 def __init__(self, device, hidden_dim, sparse_inputs=False, act=nn.Tanh(), bias=True, dropout=0.6):
18 super(GraphConvolution, self).__init__()
19 self.active_function = act
20 self.dropout_rate = dropout
21 if dropout>0:
22 self.dropout = nn.Dropout(p=dropout)
23 self.sparse_inputs = sparse_inputs
24 self.hidden_dim = hidden_dim
25 self.bias = bias
26 self.W = nn.Parameter(torch.zeros(size=(hidden_dim, hidden_dim)))
27 Truncated_initializer(self.W)
28 if self.bias:
29 self.b = nn.Parameter(torch.zeros(hidden_dim))
30 else:
31 self.b = None
32 self.device = device
33
34 def forward(self, inputs, adj):
35 x = inputs

Callers

nothing calls this directly

Calls 2

Truncated_initializerFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected