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

Method call

tf_euler/python/utils/layers.py:106–116  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

104 self.built = True
105
106 def call(self, inputs):
107 rank = inputs.shape.ndims
108 if rank > 2:
109 outputs = tf.tensordot(inputs, self.kernel, [[rank - 1], [0]])
110 else:
111 outputs = tf.matmul(inputs, self.kernel)
112 if self.use_bias:
113 outputs = tf.nn.bias_add(outputs, self.bias)
114 if self.activation:
115 outputs = self.activation(outputs)
116 return outputs
117
118
119class Embedding(Layer):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected