docstr: Set the regularizer of the weights of this layer.
  
  Parameters
  ----------
  regularizer: str (name of objective function) or objective function or `tf.keras.regularizers.Regularizer` instance or list
      Regularizer of the weights determining entity and relation embeddings.
      If it is a single value, then both the entities and relations will be regularized based on
      the same regularizer. If it is a list, the first regularizer will be used for entities and the second
      for relations.
docstr_tok: ["Set","the","regularizer","of","the","weights","of","this","layer",".","Parameters","--","--","--","--","--","regularizer",":","str","(","name","of","objective","function",")","or","objective","function","or","`","tf.keras.regularizers.Regularizer","`","instance","or","list","Regularizer","of","the","weights","determining","entity","and","relation","embeddings",".","If","it","is","a","single","value",",","then","both","the","entities","and","relations","will","be","regularized","based","on","the","same","regularizer",".","If","it","is","a","list",",","the","first","regularizer","will","be","used","for","entities","and","the","second","for","relations","."]
code: def set_regularizer(self, regularizer):
      """
      Set the regularizer of the weights of this layer.
  
      Parameters
      ----------
      regularizer: str (name of objective function) or objective function or `tf.keras.regularizers.Regularizer` instance or list
          Regularizer of the weights determining entity and relation embeddings.
          If it is a single value, then both the entities and relations will be regularized based on
          the same regularizer. If it is a list, the first regularizer will be used for entities and the second
          for relations.
  
      """
  
      if isinstance(regularizer, list):
          assert (
              len(regularizer) == 2
          ), "Incorrect length for regularizer. Expected 2, got {}".format(
              len(regularizer)
          )
          self.ent_regularizer = tf.keras.regularizers.get(
              regularizer[0]
          )
          self.rel_regularizer = tf.keras.regularizers.get(
              regularizer[1]
          )
      else:
          self.ent_regularizer = tf.keras.regularizers.get(regularizer)
          self.rel_regularizer = tf.keras.regularizers.get(regularizer)
  
file_path: AmpliGraph/ampligraph/latent_features/layers/encoding/EmbeddingLookupLayer.py
imports: import tensorflow
  import numpy
label_desc: Use image node_id 5 for calling the EmbeddingLookupLayer obj's underlying member method code with example usage: obj.set_regularizer(regularizer) without return types