class_docstr: Image Augmentation.
  
  Base class for applying real-time augmentation related to images.
  
  This class is meant to be used as an argument of `input_data`. When training
  a model, the defined augmentation methods will be applied at training
  time only. Note that ImagePreprocessing is similar to ImageAugmentation,
  but applies at both training time and testing time.
  
  Arguments:
      None.
  
  Parameters:
      methods: `list of function`. The augmentation methods to apply.
      args: A `list` of arguments list to use for these methods.
class_docstr_tok: ["Image","Augmentation",".","Base","class","for","applying","real-time","augmentation","related","to","images",".","This","class","is","meant","to","be","used","as","an","argument","of","`","input_data","`",".","When","training","a","model",",","the","defined","augmentation","methods","will","be","applied","at","training","time","only",".","Note","that","ImagePreprocessing","is","similar","to","ImageAugmentation",",","but","applies","at","both","training","time","and","testing","time",".","Arguments",":","None",".","Parameters",":","methods",":","`","list","of","function","`",".","The","augmentation","methods","to","apply",".","args",":","A","`","list","`","of","arguments","list","to","use","for","these","methods","."]
docstr: add_random_crop.
  
  Randomly crop a picture according to 'crop_shape'. An optional padding
  can be specified, for padding picture with 0s (To conserve original
  image shape).
  
  Examples:
      ```python
      # Example: pictures of 32x32
      imgaug = tflearn.ImageAugmentation()
      # Random crop of 24x24 into a 32x32 picture => output 24x24
      imgaug.add_random_crop((24, 24))
      # Random crop of 32x32 with image padding of 6 (to conserve original image shape) => output 32x32
      imgaug.add_random_crop((32, 32), 6)
      ```
  
  Arguments:
      crop_shape: `tuple` of `int`. The crop shape (height, width).
      padding: `int`. If not None, the image is padded with 'padding' 0s.
  
  Returns:
      Nothing.
docstr_tok: ["add_random_crop",".","Randomly","crop","a","picture","according","to","'crop_shape","'",".","An","optional","padding","can","be","specified",",","for","padding","picture","with","0s","(","To","conserve","original","image","shape",")",".","Examples",":","``","`","python","#","Example",":","pictures","of","32x32","imgaug","=","tflearn.ImageAugmentation","(",")","#","Random","crop","of","24x24","into","a","32x32","picture","=",">","output","24x24","imgaug.add_random_crop","(","(","24",",","24",")",")","#","Random","crop","of","32x32","with","image","padding","of","6","(","to","conserve","original","image","shape",")","=",">","output","32x32","imgaug.add_random_crop","(","(","32",",","32",")",",","6",")","``","`","Arguments",":","crop_shape",":","`","tuple","`","of","`","int","`",".","The","crop","shape","(","height",",","width",")",".","padding",":","`","int","`",".","If","not","None",",","the","image","is","padded","with","'padding","'","0s",".","Returns",":","Nothing","."]
code: def add_random_crop(self, crop_shape, padding=None):
      """add_random_crop.
  
      Randomly crop a picture according to 'crop_shape'. An optional padding
      can be specified, for padding picture with 0s (To conserve original
      image shape).
  
      Examples:
          ```python
          # Example: pictures of 32x32
          imgaug = tflearn.ImageAugmentation()
          # Random crop of 24x24 into a 32x32 picture => output 24x24
          imgaug.add_random_crop((24, 24))
          # Random crop of 32x32 with image padding of 6 (to conserve original image shape) => output 32x32
          imgaug.add_random_crop((32, 32), 6)
          ```
  
      Arguments:
          crop_shape: `tuple` of `int`. The crop shape (height, width).
          padding: `int`. If not None, the image is padded with 'padding' 0s.
  
      Returns:
          Nothing.
  
      """
      self.methods.append(self._random_crop)
      self.args.append([crop_shape, padding])
  
imports: from __future__ import division, print_function, absolute_import
  import random
  import numpy
label_desc: Use image node_id 2 for calling the ImageAugmentation obj's underlying member method code with example usage: obj.add_random_crop(crop_shape, padding) without return types