MCPcopy
hub / github.com/tkipf/pygcn / __init__

Method __init__

pygcn/layers.py:14–23  ·  view source on GitHub ↗
(self, in_features, out_features, bias=True)

Source from the content-addressed store, hash-verified

12 """
13
14 def __init__(self, in_features, out_features, bias=True):
15 super(GraphConvolution, self).__init__()
16 self.in_features = in_features
17 self.out_features = out_features
18 self.weight = Parameter(torch.FloatTensor(in_features, out_features))
19 if bias:
20 self.bias = Parameter(torch.FloatTensor(out_features))
21 else:
22 self.register_parameter('bias', None)
23 self.reset_parameters()
24
25 def reset_parameters(self):
26 stdv = 1. / math.sqrt(self.weight.size(1))

Callers

nothing calls this directly

Calls 1

reset_parametersMethod · 0.95

Tested by

no test coverage detected