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.
code: def _build_shared_graph(self):
      with tf.variable_scope(self._scope, reuse=self._reuse):
          self._embedding = tf.get_variable(
              "embedding",
              shape=self._shape,
              trainable=True,
              initializer=self._initializer,
          )
  
          if self._ids is not None:
              self._outputs.append(
                  tf.nn.embedding_lookup(self._embedding, self._ids)
              )
  
              if self._l2_reg is not None:
                  self._loss = self._l2_reg * tf.nn.l2_loss(
                      self._outputs[0]
                  )
  
          else:
              self._outputs.append(self._embedding)
  
imports: import tensorflow
  from openrec.tf1.legacy.modules.extractions import Extraction
label_desc: Use image node_id 2 for calling the LatentFactor obj's underlying member method code with example usage: obj._build_shared_graph() without return types