class_docstr: Cross-entropy loss for a multiclass softmax classifier.
  :param model: Model instance, the model on which to apply the loss.
  :param smoothing: float, amount of label smoothing for cross-entropy.
  :param attack: function, given an input x, return an attacked x'.
  :param pass_y: bool, if True pass y to the attack
  :param adv_coeff: Coefficient to put on the cross-entropy for
    adversarial examples, if adversarial examples are used.
    The coefficient on the cross-entropy for clean examples is
    1. - adv_coeff.
  :param attack_params: dict, keyword arguments passed to `attack.generate`
class_docstr_tok: ["Cross-entropy","loss","for","a","multiclass","softmax","classifier",".",":","param","model",":","Model","instance",",","the","model","on","which","to","apply","the","loss",".",":","param","smoothing",":","float",",","amount","of","label","smoothing","for","cross-entropy",".",":","param","attack",":","function",",","given","an","input","x",",","return","an","attacked","x","'",".",":","param","pass_y",":","bool",",","if","True","pass","y","to","the","attack",":","param","adv_coeff",":","Coefficient","to","put","on","the","cross-entropy","for","adversarial","examples",",","if","adversarial","examples","are","used",".","The","coefficient","on","the","cross-entropy","for","clean","examples","is","1",".","-","adv_coeff",".",":","param","attack_params",":","dict",",","keyword","arguments","passed","to","`","attack.generate","`"]
code: def __init__(
      self,
      model,
      smoothing=0.0,
      attack=None,
      pass_y=False,
      adv_coeff=0.5,
      attack_params=None,
      **kwargs,
  ):
      if smoothing < 0 or smoothing > 1:
          raise ValueError("Smoothing must be in [0, 1]", smoothing)
      self.kwargs = kwargs
      Loss.__init__(self, model, locals(), attack)
      self.smoothing = smoothing
      self.adv_coeff = adv_coeff
      self.pass_y = pass_y
      self.attack_params = attack_params
  
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 1 to create a new CrossEntropy object from inherited base classes: Loss with example: obj = CrossEntropy(model, smoothing, attack, pass_y, adv_coeff, attack_params)