class_docstr: Deprecated version of `CrossEntropy` that returns per-example loss rather
  than mean loss.
class_docstr_tok: ["Deprecated","version","of","`","CrossEntropy","`","that","returns","per-example","loss","rather","than","mean","loss","."]
code: def fprop(self, x, y, **kwargs):
      if self.attack is not None:
          x = x, self.attack(x)
      else:
          x = tuple([x])
  
      # Catching RuntimeError: Variable -= value not supported by tf.eager.
      try:
          y -= self.smoothing * (
              y - 1.0 / tf.cast(y.shape[-1], tf.float32)
          )
      except RuntimeError:
          y.assign_sub(
              self.smoothing
              * (y - 1.0 / tf.cast(y.shape[-1], tf.float32))
          )
  
      logits = [self.model.get_logits(x, **kwargs) for x in x]
      loss = sum(
          softmax_cross_entropy_with_logits(labels=y, logits=logit)
          for logit in logits
      )
      warnings.warn(
          "LossCrossEntropy is deprecated, switch to "
          "CrossEntropy. LossCrossEntropy may be removed on "
          "or after 2019-03-06."
      )
      return 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 LossCrossEntropy obj's underlying member method code with example usage: obj.fprop(x, y) and returns: loss