docstr: Builds the embedding lookup error.
  
  The trainable weights are created based on the hyperparams.
docstr_tok: ["Builds","the","embedding","lookup","error",".","The","trainable","weights","are","created","based","on","the","hyperparams","."]
code: def build(self, input_shape):
      """Builds the embedding lookup error.
  
      The trainable weights are created based on the hyperparams.
      """
      # create the trainable variables for entity embeddings
      if self._has_enough_args_to_build_ent_emb:
          self.ent_emb = self.add_weight(
              "ent_emb",
              shape=[self._max_ent_size_internal, self.k],
              initializer=self.ent_init,
              regularizer=self.ent_regularizer,
              dtype=tf.float32,
              trainable=True,
          )
  
          if self.ent_partition is not None:
              paddings_ent = [
                  [
                      0,
                      self._max_ent_size_internal
                      - self.ent_partition.shape[0],
                  ],
                  [0, 0],
              ]
              self.ent_emb.assign(
                  np.pad(
                      self.ent_partition,
                      paddings_ent,
                      "constant",
                      constant_values=0,
                  )
              )
              del self.ent_partition
              self.ent_partition = None
  
      else:
          raise TypeError(
              "Not enough arguments to build Encoding Layer. Please set max_ent_size property."
          )
  
      # create the trainable variables for relation embeddings
      if self._has_enough_args_to_build_rel_emb:
          self.rel_emb = self.add_weight(
              "rel_emb",
              shape=[self._max_rel_size_internal, self.k],
              initializer=self.rel_init,
              regularizer=self.rel_regularizer,
              dtype=tf.float32,
              trainable=True,
          )
  
          if self.rel_partition is not None:
              paddings_rel = [
                  [
                      0,
                      self._max_rel_size_internal
                      - self.rel_partition.shape[0],
                  ],
                  [0, 0],
              ]
              self.rel_emb.assign(
                  np.pad(
                      self.rel_partition,
                      paddings_rel,
                      "constant",
                      constant_values=0,
                  )
              )
              del self.rel_partition
              self.rel_partition = None
      else:
          raise TypeError(
              "Not enough arguments to build Encoding Layer. Please set max_rel_size property."
          )
  
      self.built = True
  
file_path: AmpliGraph/ampligraph/latent_features/layers/encoding/EmbeddingLookupLayer.py
imports: import tensorflow
  import numpy
label_desc: Use image node_id 10 for calling the EmbeddingLookupLayer obj's underlying member method code with example usage: obj.build(input_shape) without return types