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

Method layerwise_embed

tf_euler/python/utils/encoders.py:785–796  ·  view source on GitHub ↗
(self, hidden)

Source from the content-addressed store, hash-verified

783 return tf.reshape(output, output_shape)
784
785 def layerwise_embed(self, hidden):
786 fanouts = [self.fanouts[0]]
787 for factor in self.fanouts[1:]:
788 val = fanouts[-1] * factor
789 fanouts += [val]
790
791 for i in range(1, len(hidden)):
792 node = hidden[i]
793 agg_dim = fanouts[i-1]
794 shape = [-1, agg_dim, self.feature_dim]
795 hidden[i] = self.agg(tf.reshape(node, shape))
796 return hidden
797
798 def fc(self, hidden):
799 fc = tf.concat(hidden, 1)

Callers 1

callMethod · 0.95

Calls 1

aggMethod · 0.95

Tested by

no test coverage detected