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

Method __call__

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

Source from the content-addressed store, hash-verified

36 self.build = False
37
38 def __call__(self, x, edge_index, size=None, **kwargs):
39 if not self.build:
40 self.build = True
41 if self.train_eps:
42 self.eps = tf.Variable([self.eps_value],
43 name='eps',
44 dtype=tf.float32)
45 else:
46 self.eps = self.eps_value
47 gather_x, = self.gather_feature([x], edge_index)
48 out = self.apply_edge(gather_x[1])
49 out = mp_ops.scatter_(self.aggr, out, edge_index[0], size=size[0])
50 out = self.apply_node(out, x[0])
51 return out
52
53 def apply_edge(self, x_j):
54 return x_j

Callers

nothing calls this directly

Calls 3

apply_edgeMethod · 0.95
apply_nodeMethod · 0.95
gather_featureMethod · 0.80

Tested by

no test coverage detected