class_docstr: Randomly crop `src` with `size` (width, height).
  Padding is optional.
  Upsample result if `src` is smaller than `size`.
  
  Parameters
  ----------
  size : int or tuple of (W, H)
      Size of the final output.
  pad: int or tuple
      if int, size of the zero-padding
      if tuple, number of values padded to the edges of each axis.
          ((before_1, after_1), ... (before_N, after_N)) unique pad widths for each axis.
          ((before, after),) yields same before and after pad for each axis.
          (pad,) or int is a shortcut for before = after = pad width for all axes.
  interpolation : int
      Interpolation method for resizing. By default uses bilinear
      interpolation. See OpenCV's resize function for available choices.
  
  
  Inputs:
      - **data**: input tensor with (Hi x Wi x C) shape.
  Outputs:
      - **out**: output tensor with (size[0] x size[1] x C) or (size x size x C) shape.
class_docstr_tok: ["Randomly","crop","`","src","`","with","`","size","`","(","width",",","height",")",".","Padding","is","optional",".","Upsample","result","if","`","src","`","is","smaller","than","`","size","`",".","Parameters","--","--","--","--","--","size",":","int","or","tuple","of","(","W",",","H",")","Size","of","the","final","output",".","pad",":","int","or","tuple","if","int",",","size","of","the","zero-padding","if","tuple",",","number","of","values","padded","to","the","edges","of","each","axis",".","(","(","before_1",",","after_1",")",",","...","(","before_N",",","after_N",")",")","unique","pad","widths","for","each","axis",".","(","(","before",",","after",")",",",")","yields","same","before","and","after","pad","for","each","axis",".","(","pad",",",")","or","int","is","a","shortcut","for","before","=","after","=","pad","width","for","all","axes",".","interpolation",":","int","Interpolation","method","for","resizing",".","By","default","uses","bilinear","interpolation",".","See","OpenCV","'s","resize","function","for","available","choices",".","Inputs",":","-","*","*","data","*","*",":","input","tensor","with","(","Hi","x","Wi","x","C",")","shape",".","Outputs",":","-","*","*","out","*","*",":","output","tensor","with","(","size","[","0","]","x","size","[","1","]","x","C",")","or","(","size","x","size","x","C",")","shape","."]
code: def __init__(self, size, pad=None, interpolation=2):
      super(RandomCrop, self).__init__()
      numeric_types = (float, int, np.generic)
      if isinstance(size, numeric_types):
          size = (size, size)
      self._args = (size, interpolation)
      self.pad = (
          ((pad, pad), (pad, pad), (0, 0))
          if isinstance(pad, int)
          else pad
      )
  
file_path: gluon-cv/gluoncv/data/transforms/block.py
imports: import random
  import math
  import numpy
  from mxnet import image, nd
  from mxnet.gluon import Block
label_desc: Use image node_id 1 to create a new RandomCrop object from inherited base classes: Block with example: obj = RandomCrop(size, pad, interpolation)