docstr: Implements an input modifier that introduces random jitter in `pre`.
  Jitter has been shown to produce crisper activation maximization images.
  
  Args:
      jitter: The amount of jitter to apply, scalar or sequence.
          If a scalar, same jitter is applied to all image dims. If sequence, `jitter` should contain a value
          per image dim.
  
          A value between `[0., 1.]` is interpreted as a percentage of the image dimension. (Default value: 0.05)
docstr_tok: ["Implements","an","input","modifier","that","introduces","random","jitter","in","`","pre","`",".","Jitter","has","been","shown","to","produce","crisper","activation","maximization","images",".","Args",":","jitter",":","The","amount","of","jitter","to","apply",",","scalar","or","sequence",".","If","a","scalar",",","same","jitter","is","applied","to","all","image","dims",".","If","sequence",",","`","jitter","`","should","contain","a","value","per","image","dim",".","A","value","between","`","[","0.",",","1",".","]","`","is","interpreted","as","a","percentage","of","the","image","dimension",".","(","Default","value",":","0.05",")"]
code: def __init__(self, jitter=0.05):
      """Implements an input modifier that introduces random jitter in `pre`.
      Jitter has been shown to produce crisper activation maximization images.
  
      Args:
          jitter: The amount of jitter to apply, scalar or sequence.
              If a scalar, same jitter is applied to all image dims. If sequence, `jitter` should contain a value
              per image dim.
  
              A value between `[0., 1.]` is interpreted as a percentage of the image dimension. (Default value: 0.05)
      """
      super(Jitter, self).__init__()
      self.jitter = np.array(utils.listify(jitter))
      if np.any(jitter < 0.0):
          raise ValueError("Jitter value should be positive")
      self._processed = False
  
file_path: keras-vis/vis/input_modifiers.py
imports: from __future__ import absolute_import
  import numpy
  from scipy.ndimage.interpolation import shift
  from .utils import utils
  from keras import backend
label_desc: Use image node_id 1 to create a new Jitter object from inherited base classes: InputModifier with example: obj = Jitter(jitter)