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

Function _sparse_eye

tf_euler/python/utils/sparse_aggregators.py:31–34  ·  view source on GitHub ↗
(num_rows, dtype=tf.float32)

Source from the content-addressed store, hash-verified

29
30
31def _sparse_eye(num_rows, dtype=tf.float32):
32 return tf.SparseTensor(
33 tf.stack([tf.range(num_rows)] * 2, axis=1),
34 tf.ones(num_rows, dtype), tf.stack([num_rows] * 2))
35
36
37class GCNAggregator(layers.Layer):

Callers 1

callMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected