MCPcopy Create free account
hub / github.com/alibaba/euler / __call__

Method __call__

tf_euler/python/convolution/gat_conv.py:53–64  ·  view source on GitHub ↗
(self, x, edge_index, size=None, **kwargs)

Source from the content-addressed store, hash-verified

51 self.att_j = Attention(dim)
52
53 def __call__(self, x, edge_index, size=None, **kwargs):
54 if isinstance(x, tf.Tensor):
55 x = self.fc(x)
56 else:
57 x = (None if x[0] is None else self.fc(x[0]),
58 None if x[1] is None else self.fc(x[1]))
59
60 gather_x, = self.gather_feature([x], edge_index)
61 out = self.apply_edge(gather_x[0], gather_x[1], edge_index[0], size[0])
62 out = mp_ops.scatter_(self.aggr, out, edge_index[0], size=size[0])
63 out = self.apply_node(out, x[0])
64 return out
65
66 def apply_edge(self, x_i, x_j, edge_index_i, size_i):
67 alpha = self.att_i(x_i) + self.att_j(x_j)

Callers

nothing calls this directly

Calls 4

apply_edgeMethod · 0.95
apply_nodeMethod · 0.95
fcMethod · 0.80
gather_featureMethod · 0.80

Tested by

no test coverage detected