MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / build

Method build

tensorlayer/layers/embedding.py:475–489  ·  view source on GitHub ↗

Parameters ---------- inputs_shape : tuple the shape of inputs tensor.

(self, inputs_shape)

Source from the content-addressed store, hash-verified

473 return s.format(classname=self.__class__.__name__, **self.__dict__)
474
475 def build(self, inputs_shape):
476 """
477 Parameters
478 ----------
479 inputs_shape : tuple
480 the shape of inputs tensor.
481 """
482 # if len(inputs_shape) != 2:
483 # raise ValueError('inputs must be of size (batch_size, sentence_length)')
484
485 self.embeddings = self._get_weights(
486 "embeddings",
487 shape=(self.vocabulary_size, self.embedding_size),
488 init=self.E_init,
489 )
490
491 # @tf.function
492 def forward(self, inputs):

Callers 1

__init__Method · 0.95

Calls 1

_get_weightsMethod · 0.80

Tested by

no test coverage detected