class_docstr: Deprecated version of `FeaturePairing` that returns per-example loss
  rather than mean loss.
class_docstr_tok: ["Deprecated","version","of","`","FeaturePairing","`","that","returns","per-example","loss","rather","than","mean","loss","."]
code: def fprop(self, x, y, **kwargs):
      x_adv = self.attack(x)
      d1 = self.model.fprop(x, **kwargs)
      d2 = self.model.fprop(x_adv, **kwargs)
      pairing_loss = [
          tf.reduce_mean(tf.square(a - b))
          for a, b in zip(d1[Model.O_FEATURES], d2[Model.O_FEATURES])
      ]
      pairing_loss = tf.reduce_mean(pairing_loss)
      loss = softmax_cross_entropy_with_logits(
          labels=y, logits=d1[Model.O_LOGITS]
      )
      loss += softmax_cross_entropy_with_logits(
          labels=y, logits=d2[Model.O_LOGITS]
      )
      warnings.warn(
          "LossFeaturePairing is deprecated, switch to "
          "FeaturePairing. LossFeaturePairing may be removed "
          "on or after 2019-03-06."
      )
      return loss + self.weight * pairing_loss
  
imports: import copy
  import json
  import os
  import warnings
  import numpy
  import tensorflow
  from cleverhans.attacks import Attack
  from cleverhans.compat import softmax_cross_entropy_with_logits
  from cleverhans.model import Model
  from cleverhans.utils import safe_zip
label_desc: Use image node_id 2 for calling the LossFeaturePairing obj's underlying member method code with example usage: obj.fprop(x, y) and returns: unknown