docstr: Initializes the embeddings of the model.
  
  Parameters
  ----------
  k: int
      Embedding size.
  max_ent_size: int
      Max entities that can occur in any partition (default: `None`).
  max_rel_size: int
      Max relations that can occur in any partition (default: `None`).
  entity_kernel_initializer: str (name of objective function), objective function or
  `tf.keras.initializers.Initializer` instance
      An objective function is any callable with the signature ``init = fn(shape)``.
      Initializer of the entity embeddings.
  entity_kernel_regularizer: str (name of objective function), objective function or
  `tf.keras.initializers.Initializer` instance
      An objective function is any callable with the signature ``init = fn(shape)``
      Initializer of the relation embeddings.
  relation_kernel_initializer: str or objective function or `tf.keras.regularizers.Regularizer` instance
      Regularizer of entity embeddings.
  relation_kernel_regularizer: str or objective function or `tf.keras.regularizers.Regularizer` instance
      Regularizer of relations embeddings.
  seed: int
      Random seed.
docstr_tok: ["Initializes","the","embeddings","of","the","model",".","Parameters","--","--","--","--","--","k",":","int","Embedding","size",".","max_ent_size",":","int","Max","entities","that","can","occur","in","any","partition","(","default",":","`","None","`",")",".","max_rel_size",":","int","Max","relations","that","can","occur","in","any","partition","(","default",":","`","None","`",")",".","entity_kernel_initializer",":","str","(","name","of","objective","function",")",",","objective","function","or","`","tf.keras.initializers.Initializer","`","instance","An","objective","function","is","any","callable","with","the","signature","``","init","=","fn","(","shape",")","``",".","Initializer","of","the","entity","embeddings",".","entity_kernel_regularizer",":","str","(","name","of","objective","function",")",",","objective","function","or","`","tf.keras.initializers.Initializer","`","instance","An","objective","function","is","any","callable","with","the","signature","``","init","=","fn","(","shape",")","``","Initializer","of","the","relation","embeddings",".","relation_kernel_initializer",":","str","or","objective","function","or","`","tf.keras.regularizers.Regularizer","`","instance","Regularizer","of","entity","embeddings",".","relation_kernel_regularizer",":","str","or","objective","function","or","`","tf.keras.regularizers.Regularizer","`","instance","Regularizer","of","relations","embeddings",".","seed",":","int","Random","seed","."]
code: def __init__(
      self,
      k,
      max_ent_size=None,
      max_rel_size=None,
      entity_kernel_initializer="glorot_uniform",
      entity_kernel_regularizer=None,
      relation_kernel_initializer="glorot_uniform",
      relation_kernel_regularizer=None,
      **kwargs,
  ):
      """
      Initializes the embeddings of the model.
  
      Parameters
      ----------
      k: int
          Embedding size.
      max_ent_size: int
          Max entities that can occur in any partition (default: `None`).
      max_rel_size: int
          Max relations that can occur in any partition (default: `None`).
      entity_kernel_initializer: str (name of objective function), objective function or
      `tf.keras.initializers.Initializer` instance
          An objective function is any callable with the signature ``init = fn(shape)``.
          Initializer of the entity embeddings.
      entity_kernel_regularizer: str (name of objective function), objective function or
      `tf.keras.initializers.Initializer` instance
          An objective function is any callable with the signature ``init = fn(shape)``
          Initializer of the relation embeddings.
      relation_kernel_initializer: str or objective function or `tf.keras.regularizers.Regularizer` instance
          Regularizer of entity embeddings.
      relation_kernel_regularizer: str or objective function or `tf.keras.regularizers.Regularizer` instance
          Regularizer of relations embeddings.
      seed: int
          Random seed.
  
      """
      super(EmbeddingLookupLayer, self).__init__(**kwargs)
  
      self._max_ent_size_internal = max_ent_size
      self._max_rel_size_internal = max_rel_size
      self.k = k
  
      self.ent_partition = None
      self.rel_partition = None
  
      self.max_ent_size = max_ent_size
      self.max_rel_size = max_rel_size
  
      self._has_enough_args_to_build_ent_emb = True
      self._has_enough_args_to_build_rel_emb = True
  
      if self.max_ent_size is None:
          self._has_enough_args_to_build_ent_emb = False
  
      if self.max_rel_size is None:
          self._has_enough_args_to_build_rel_emb = False
  
      self.ent_init = entity_kernel_initializer
      self.rel_init = relation_kernel_initializer
  
      self.ent_regularizer = entity_kernel_regularizer
      self.rel_regularizer = relation_kernel_regularizer
  
file_path: AmpliGraph/ampligraph/latent_features/layers/encoding/EmbeddingLookupLayer.py
imports: import tensorflow
  import numpy
label_desc: Use image node_id 2 to create a new EmbeddingLookupLayer object from inherited base classes: tf.keras.layers with example: obj = EmbeddingLookupLayer(k, max_ent_size, max_rel_size, entity_kernel_initializer, entity_kernel_regularizer, relation_kernel_initializer, relation_kernel_regularizer)