class_docstr: This loss function models the explicit positive and negative interaction predictions as normal distributions and
  returns the probability of overlap between the two distributions.
  Interactions can be any positive or negative values, but this loss function ignores the magnitude of the
  interaction -- interactions are grouped in to {i <= 0} and {i > 0}.
class_docstr_tok: ["This","loss","function","models","the","explicit","positive","and","negative","interaction","predictions","as","normal","distributions","and","returns","the","probability","of","overlap","between","the","two","distributions",".","Interactions","can","be","any","positive","or","negative","values",",","but","this","loss","function","ignores","the","magnitude","of","the","interaction","--","interactions","are","grouped","in","to","{","i","<","=","0","}","and","{","i",">","0","}","."]
code: def connect_loss_graph(
      self, tf_prediction_serial, tf_interactions_serial, **kwargs
  ):
      tf_positive_mask = tf.greater(tf_interactions_serial, 0.0)
      tf_negative_mask = tf.less_equal(tf_interactions_serial, 0.0)
  
      tf_positive_predictions = tf.boolean_mask(
          tf_prediction_serial, tf_positive_mask
      )
      tf_negative_predictions = tf.boolean_mask(
          tf_prediction_serial, tf_negative_mask
      )
  
      tf_pos_mean, tf_pos_var = tf.nn.moments(
          tf_positive_predictions, axes=[0]
      )
      tf_neg_mean, tf_neg_var = tf.nn.moments(
          tf_negative_predictions, axes=[0]
      )
  
      tf_overlap_distribution = tf.contrib.distributions.Normal(
          loc=(tf_neg_mean - tf_pos_mean),
          scale=tf.sqrt(tf_neg_var + tf_pos_var),
      )
  
      loss = 1.0 - tf_overlap_distribution.cdf(0.0)
      return loss
  
imports: import abc
  import tensorflow
label_desc: Use image node_id 1 for calling the SeparationLossGraph obj's underlying member method code with example usage: obj.connect_loss_graph(tf_prediction_serial, tf_interactions_serial) and returns: loss