class_docstr: Complex Embeddings (ComplEx) scoring layer.
  
  The ComplEx model :cite:`trouillon2016complex` is an extension of
  the :class:`ampligraph.latent_features.DistMult` bilinear diagonal model.
  
  ComplEx scoring function is based on the trilinear Hermitian dot product in :math:`\mathbb{C}`:
  
  .. math::
      f_{ComplEx}=Re(\langle \mathbf{r}_p, \mathbf{e}_s, \overline{\mathbf{e}_o}  \rangle)
  
  .. note::
      Since ComplEx embeddings belong to :math:`\mathbb{C}`, this model uses twice as many parameters as
      :class:`ampligraph.latent_features.DistMult`.
code: def __init__(self, k):
      super(ComplEx, self).__init__(k)
      # internally complex uses k embedddings for real part and k embedddings for img part
      # hence internally it uses 2 * k embeddings
      self.internal_k = 2 * k
  
file_path: AmpliGraph/ampligraph/latent_features/layers/scoring/ComplEx.py
imports: import tensorflow
  from .AbstractScoringLayer import register_layer, AbstractScoringLayer
label_desc: Use image node_id 2 to create a new ComplEx object from inherited base classes: AbstractScoringLayer with example: obj = ComplEx(k)