code: def _xent_loss(
      self, inputs1, inputs2, neg_samples, hard_neg_samples=None
  ):
      aff = self.affinity(inputs1, inputs2)
      neg_aff = self.neg_cost(inputs1, neg_samples, hard_neg_samples)
      true_xent = tf.nn.sigmoid_cross_entropy_with_logits(
          labels=tf.ones_like(aff), logits=aff
      )
      negative_xent = tf.nn.sigmoid_cross_entropy_with_logits(
          labels=tf.zeros_like(neg_aff), logits=neg_aff
      )
      loss = tf.reduce_sum(
          true_xent
      ) + self.neg_sample_weights * tf.reduce_sum(negative_xent)
      return loss
  
file_path: GraphSAGE/graphsage/prediction.py
imports: from __future__ import division
  from __future__ import print_function
  from graphsage.inits import zeros
  from graphsage.layers import Layer
  import tensorflow
label_desc: Use image node_id 5 for calling the BipartiteEdgePredLayer obj's underlying member method code with example usage: obj._xent_loss(inputs1, inputs2, neg_samples, hard_neg_samples) and returns: loss