class_docstr: The PairwiseHinge module minimizes the pairwise hinge loss as follows (regularization and bias terms     are not included):
  
  .. math::
      \min \sum_{(i, p, n)} [m - u_i^T v_p + u_i^T v_n]_+
  
  where :math:`u_i` denotes the representation for user :math:`i`; :math:`v_p` and :math:`v_n` denote representations for     *positive item* :math:`p` and *negative item* :math:`n`, respectively.
  
  Parameters
  ----------
  user: Tensorflow tensor
      Representations for users involved in the interactions. Shape: **[number of interactions, dimensionality of         user representations]**.
  item: Tensorflow tensor, required for testing
      Representations for items involved in the interactions. Shape: **[number of interactions, dimensionality of         item representations]**.
  item_bias: Tensorflow tensor, required for testing
      Biases for items involved in the interactions. Shape: **[number of interactions, 1]**.
  p_item: Tensorflow tensor, required for training
      Representations for positive items involved in the interactions. Shape: **[number of interactions, dimensionality of         item representations]**.
  p_item_bias: Tensorflow tensor, required for training
      Biases for positive items involved in the interactions. Shape: **[number of interactions, 1]**.
  n_item: Tensorflow tensor, required for training
      Representations for negative items involved in the interactions. Shape: **[number of interactions, dimensionality of         item representations]**.
  n_item_bias: Tensorflow tensor, required for training
      Biases for negative items involved in the interactions. Shape: **[number of interactions, 1]**.
  train: bool, optionl
      An indicator for training or serving phase.
  scope: str, optional
      Scope for module variables.
  reuse: bool, optional
      Whether or not to reuse module variables.
code: def _build_serving_graph(self):
      with tf.variable_scope(self._scope, reuse=self._reuse):
          self._outputs.append(
              tf.matmul(self._user, self._item, transpose_b=True)
              + tf.reshape(self._item_bias, [-1])
          )
  
imports: import tensorflow
  from openrec.tf1.legacy.modules.interactions import Interaction
label_desc: Use image node_id 3 for calling the PairwiseHinge obj's underlying member method code with example usage: obj._build_serving_graph() without return types