docstr: Set the initializer of the weights of this layer.
  
  Parameters
  ----------
  initializer: str (name of objective function) or objective function or `tf.keras.initializers.Initializer` or list
      Initializer of the entity and relation embeddings. This is either a single value or a list of size 2.
      If it is a single value, then both the entities and relations will be initialized based on
      the same initializer. If it is a list, the first initializer will be used for entities and the second
      for relations. Any callable with the signature ``init = fn(shape)`` can be interpreted as an objective
      function.
docstr_tok: ["Set","the","initializer","of","the","weights","of","this","layer",".","Parameters","--","--","--","--","--","initializer",":","str","(","name","of","objective","function",")","or","objective","function","or","`","tf.keras.initializers.Initializer","`","or","list","Initializer","of","the","entity","and","relation","embeddings",".","This","is","either","a","single","value","or","a","list","of","size","2",".","If","it","is","a","single","value",",","then","both","the","entities","and","relations","will","be","initialized","based","on","the","same","initializer",".","If","it","is","a","list",",","the","first","initializer","will","be","used","for","entities","and","the","second","for","relations",".","Any","callable","with","the","signature","``","init","=","fn","(","shape",")","``","can","be","interpreted","as","an","objective","function","."]
code: def set_initializer(self, initializer):
      """
      Set the initializer of the weights of this layer.
  
      Parameters
      ----------
      initializer: str (name of objective function) or objective function or `tf.keras.initializers.Initializer` or list
          Initializer of the entity and relation embeddings. This is either a single value or a list of size 2.
          If it is a single value, then both the entities and relations will be initialized based on
          the same initializer. If it is a list, the first initializer will be used for entities and the second
          for relations. Any callable with the signature ``init = fn(shape)`` can be interpreted as an objective
          function.
  
      """
      if isinstance(initializer, list):
          assert (
              len(initializer) == 2
          ), "Incorrect length for initializer. Assumed 2 got {}".format(
              len(initializer)
          )
          self.ent_init = tf.keras.initializers.get(initializer[0])
          self.rel_init = tf.keras.initializers.get(initializer[1])
      else:
          self.ent_init = tf.keras.initializers.get(initializer)
          self.rel_init = tf.keras.initializers.get(initializer)
  
file_path: AmpliGraph/ampligraph/latent_features/layers/encoding/EmbeddingLookupLayer.py
imports: import tensorflow
  import numpy
label_desc: Use image node_id 4 for calling the EmbeddingLookupLayer obj's underlying member method code with example usage: obj.set_initializer(initializer) without return types