class_docstr: The PointwiseGeCE module minimizes the cross entropy classification loss with generalized dot product as logits. The generalized    dot-product [ncf]_ between user representation :math:`u_i` and item representation :math:`v_j` is defined as: 
  
  .. math::
      h^T(u_i \odot v_j)
  
  where :math:`\odot` denotes element-wise dot product of two vectors, and :math:`h` denotes learnable model parameters.
  
  Parameters
  ----------
  user: Tensorflow tensor
      Representations for users involved in the interactions. Shape: **[number of interactions, dimensionality of         user representations]**.
  item: Tensorflow tensor
      Representations for items involved in the interactions. Shape: **[number of interactions, dimensionality of         item representations]**.
  item_bias: Tensorflow tensor
      Biases for items involved in the interactions. Shape: **[number of interactions, 1]**.
  labels: Tensorflow tensor, required for training.
      Groundtruth labels for the interactions. Shape **[number of interactions, ]**.
  l2_reg: float, optional
      Weight for L2 regularization, i.e., weight decay.
  train: bool, optionl
      An indicator for training or servining phase.
  scope: str, optional
      Scope for module variables.
  reuse: bool, optional
      Whether or not to reuse module variables.
  
  References
  ----------
  .. [ncf] He, X., Liao, L., Zhang, H., Nie, L., Hu, X. and Chua, T.S., 2017, April. Neural collaborative filtering.         In Proceedings of the 26th International Conference on World Wide Web (pp. 173-182). International World Wide Web         Conferences Steering Committee.
code: def __init__(
      self,
      user,
      item,
      item_bias,
      l2_reg=None,
      labels=None,
      train=None,
      scope=None,
      reuse=False,
  ):
      assert train is not None, "train cannot be None"
      assert user is not None, "user cannot be None"
      assert item is not None, "item cannot be None"
      assert item_bias is not None, "item_bias cannot be None"
  
      self._user = user
      self._item = item
      self._item_bias = item_bias
  
      if train:
          assert labels is not None, "labels cannot be None"
          self._labels = labels
  
      super(PointwiseGeCE, self).__init__(
          train=train, l2_reg=l2_reg, scope=scope, reuse=reuse
      )
  
file_path: openrec/openrec/tf1/legacy/modules/interactions/pointwise_ge_ce.py
imports: from __future__ import print_function
  import tensorflow
  from termcolor import colored
  from openrec.tf1.legacy.modules.extractions import MultiLayerFC
  from openrec.tf1.legacy.modules.interactions import Interaction
label_desc: Use image node_id 1 to create a new PointwiseGeCE object from inherited base classes: Interaction with example: obj = PointwiseGeCE(user, item, item_bias, l2_reg, labels, train, scope, reuse)