class_docstr: Base class of model to provide attack.
  
  Args:
      bounds(tuple): The lower and upper bound for the image pixel.
      channel_axis(int): The index of the axis that represents the color
              channel.
      preprocess(tuple): Two element tuple used to preprocess the input.
          First substract the first element, then divide the second element.
class_docstr_tok: ["Base","class","of","model","to","provide","attack",".","Args",":","bounds","(","tuple",")",":","The","lower","and","upper","bound","for","the","image","pixel",".","channel_axis","(","int",")",":","The","index","of","the","axis","that","represents","the","color","channel",".","preprocess","(","tuple",")",":","Two","element","tuple","used","to","preprocess","the","input",".","First","substract","the","first","element",",","then","divide","the","second","element","."]
code: def __init__(self, bounds, channel_axis, preprocess=None):
      assert len(bounds) == 2
      assert channel_axis in [0, 1, 2, 3]
  
      self._bounds = bounds
      self._channel_axis = channel_axis
  
      # Make self._preprocess to be (0,1) if possible, so that don't need
      # to do substract or divide.
      if preprocess is not None:
          sub, div = np.array(preprocess)
          if not np.any(sub):
              sub = 0
          if np.all(div == 1):
              div = 1
          assert (div is None) or np.all(div)
          self._preprocess = (sub, div)
      else:
          self._preprocess = (0, 1)
  
file_path: AdvBox/adversarialbox/models/base.py
imports: from __future__ import division
  from builtins import object
  from past.utils import old_div
  from abc import ABCMeta
  from abc import abstractmethod
  import numpy
  from future.utils import with_metaclass
label_desc: Use image node_id 1 to create a new Model object from inherited base classes:  with example: obj = Model(bounds, channel_axis, preprocess)