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 __init__(
      self,
      shape,
      init="normal",
      ids=None,
      l2_reg=None,
      scope=None,
      reuse=False,
  ):
      assert shape is not None, "shape cannot be None"
  
      if init == "normal":
          self._initializer = tf.truncated_normal_initializer(
              mean=0.0, stddev=0.01, dtype=tf.float32
          )
      elif init == "zero":
          self._initializer = tf.constant_initializer(
              value=0.0, dtype=tf.float32
          )
      self._shape = shape
      self._ids = ids
  
      super(LatentFactor, self).__init__(
          l2_reg=l2_reg, scope=scope, reuse=reuse
      )
  
imports: import tensorflow
  from openrec.tf1.legacy.modules.extractions import Extraction
label_desc: Use image node_id 1 to create a new LatentFactor object from inherited base classes: Extraction with example: obj = LatentFactor(shape, init, ids, l2_reg, scope, reuse)