class_docstr: Single random rotation attack.
  
  Reference:
  Engstrom et al. Exploring the Landscape of Spatial Robustness.
  https://arxiv.org/pdf/1712.02779.pdf
class_docstr_tok: ["Single","random","rotation","attack",".","Reference",":","Engstrom","et","al",".","Exploring","the","Landscape","of","Spatial","Robustness",".","https",":","\/\/arxiv.org\/pdf\/1712.02779.pdf"]
code: def __init__(self, max_degree):
      self.max_degree = max_degree
      logging.info("ROTATION CONFIG CREATION: %s", self.__dict__)
      self.rotate = (
          tf.keras.layers.experimental.preprocessing.RandomRotation(
              factor=max_degree / 360.0, fill_mode="constant"
          )
      )
  
imports: from absl import logging
  import gin
  import neural_structured_learning
  from multi_representation_adversary.cleverhans_adapter import sparse_l1_descent
  from multi_representation_adversary.cleverhans_adapter import utils_tf
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new SingleRotationAttack object from inherited base classes: Attack with example: obj = SingleRotationAttack(max_degree)