class_docstr: The PointwiseMLPCE module minimizes the cross entropy classification loss with outputs of a Multi-Layer Perceptron (MLP) as logits.     The inputs to the MLP are the concatenation between user and item representations [ncf]_.
  
  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]**.
  dims: Numpy array.
      Specify the size of the MLP (openrec.tf1.legacy.modules.extractions.MultiLayerFC).
  item_bias: Tensorflow tensor, optional
      Biases for items involved in the interactions. Shape: **[number of interactions, 1]**.
  extra: Tensorflow tensor, optional
      Representations for context involved in the interactions. Shape: **[number of interaction, dimensionality of         context representations]**
  l2_reg: float, optional
      Weight for L2 regularization, i.e., weight decay.
  labels: Tensorflow tensor, required for training.
      Groundtruth labels for the interactions. Shape **[number of interactions, ]**.
  dropout: float, optional
      Dropout rate for MLP (intermediate layers only).
  train: bool, optional
      An indicator for training or servining phase.
  batch_serving: bool, optional
      An indicator for batch serving / pointwise serving.
  scope: str, optional
      Scope for module variables.
  reuse: bool, optional
      Whether or not to reuse module variables.
code: def _build_training_graph(self):
      with tf.variable_scope(self._scope, reuse=self._reuse):
          if self._extra is not None:
              in_tensor = tf.concat(
                  [self._user, self._item, self._extra], axis=1
              )
          else:
              in_tensor = tf.concat([self._user, self._item], axis=1)
  
          reg = MultiLayerFC(
              in_tensor=in_tensor,
              dims=self._dims,
              bias_in=True,
              bias_mid=True,
              bias_out=False,
              dropout_mid=self._dropout,
              l2_reg=self._l2_reg,
              scope="mlp_reg",
              reuse=self._reuse,
          )
  
          logits = reg.get_outputs()[0]
          if self._item_bias is not None:
              logits += self._item_bias
  
          labels_float = tf.reshape(tf.to_float(self._labels), (-1, 1))
          self._loss = tf.reduce_sum(
              tf.nn.sigmoid_cross_entropy_with_logits(
                  labels=labels_float, logits=logits
              )
          )
          self._outputs.append(logits)
  
file_path: openrec/openrec/tf1/legacy/modules/interactions/pointwise_mlp_ce.py
imports: from __future__ import print_function
  import tensorflow
  from openrec.tf1.legacy.modules.interactions import Interaction
  from openrec.tf1.legacy.modules.extractions import MultiLayerFC
label_desc: Use image node_id 2 for calling the PointwiseMLPCE obj's underlying member method code with example usage: obj._build_training_graph() without return types