class_docstr: The LatentFactor module maps (embeds) input ids into latent representations. The module     outputs a tensor with shape **shape(ids) + [embedding dimensionality]**.
  
  Parameters
  ----------
  shape: list
      Shape of the embedding matrix, i.e. [number of unique ids, embedding dimensionality].
  init: str, optional
      Embedding initialization. *'zero'* or *'normal'* (default).
  ids: Tensorflow tensor, optionl
      List of ids to retrieve embeddings. If *None*, the whole embedding matrix is returned.
  l2_reg: float, optional
      Weight for L2 regularization, i.e., weight decay.
  scope: str, optional
      Scope for module variables.
  reuse: bool, optional
      Whether or not to reuse module variables.
docstr: Limit the norm of embeddings.
  
  Parameters
  ----------
  censor_id_list: list or Tensorflow tensor
      list of embeddings to censor (indexed by ids).
  max_norm: float, optional
      Maximum norm.
  
  Returns
  -------
  Tensorflow operator
      An operator for post-training execution.
docstr_tok: ["Limit","the","norm","of","embeddings",".","Parameters","--","--","--","--","--","censor_id_list",":","list","or","Tensorflow","tensor","list","of","embeddings","to","censor","(","indexed","by","ids",")",".","max_norm",":","float",",","optional","Maximum","norm",".","Returns","--","--","--","-","Tensorflow","operator","An","operator","for","post-training","execution","."]
code: def censor_l2_norm_op(self, censor_id_list=None, max_norm=1):
      """Limit the norm of embeddings.
  
      Parameters
      ----------
      censor_id_list: list or Tensorflow tensor
          list of embeddings to censor (indexed by ids).
      max_norm: float, optional
          Maximum norm.
  
      Returns
      -------
      Tensorflow operator
          An operator for post-training execution.
      """
  
      embedding_gather = tf.gather(
          self._embedding, indices=censor_id_list
      )
      norm = tf.sqrt(
          tf.reduce_sum(
              tf.square(embedding_gather), axis=1, keep_dims=True
          )
      )
      return tf.scatter_update(
          self._embedding,
          indices=censor_id_list,
          updates=embedding_gather / tf.maximum(norm, max_norm),
      )
  
imports: import tensorflow
  from openrec.tf1.legacy.modules.extractions import Extraction
label_desc: Use image node_id 3 for calling the LatentFactor obj's underlying member method code with example usage: obj.censor_l2_norm_op(censor_id_list, max_norm) and returns: tf