class_docstr: Semantic adversarial examples
  
  https://arxiv.org/abs/1703.06857
  
  Note: data must either be centered (so that the negative image can be
  made by simple negation) or must be in the interval [-1, 1]
  
  :param model: cleverhans.model.Model
  :param center: bool
    If True, assumes data has 0 mean so the negative image is just negation.
    If False, assumes data is in the interval [0, max_val]
  :param max_val: float
    Maximum value allowed in the input data
  :param sess: optional tf.Session
  :param dtypestr: dtype of data
  :param kwargs: passed through to the super constructor
class_docstr_tok: ["Semantic","adversarial","examples","https",":","\/\/arxiv.org\/abs\/1703.06857","Note",":","data","must","either","be","centered","(","so","that","the","negative","image","can","be","made","by","simple","negation",")","or","must","be","in","the","interval","[","-1",",","1","]",":","param","model",":","cleverhans.model.Model",":","param","center",":","bool","If","True",",","assumes","data","has","0","mean","so","the","negative","image","is","just","negation",".","If","False",",","assumes","data","is","in","the","interval","[","0",",","max_val","]",":","param","max_val",":","float","Maximum","value","allowed","in","the","input","data",":","param","sess",":","optional","tf.Session",":","param","dtypestr",":","dtype","of","data",":","param","kwargs",":","passed","through","to","the","super","constructor"]
code: def __init__(
      self,
      model,
      center,
      max_val=1.0,
      sess=None,
      dtypestr="float32",
      **kwargs,
  ):
      super(Semantic, self).__init__(model, sess, dtypestr, **kwargs)
      self.center = center
      self.max_val = max_val
      if hasattr(model, "dataset_factory"):
          if "center" in model.dataset_factory.kwargs:
              assert center == model.dataset_factory.kwargs["center"]
  
imports: from cleverhans.attacks.attack import Attack
label_desc: Use image node_id 1 to create a new Semantic object from inherited base classes: Attack with example: obj = Semantic(model, center, max_val, sess, dtypestr)