random_crop(x, crop_size, batch_shape=None, image_dims=None, f=None)¶
Randomly crops the input images.
x (array) – Input images to crop [batch_shape,h,w,f]
crop_size (sequence of ints) – The 2D crop size.
batch_shape (sequence of ints, optional) – Shape of batch. Inferred from inputs if None.
image_dims (sequence of ints, optional) – Image dimensions. Inferred from inputs in None.
f (ml_framework, optional) – Machine learning library. Inferred from inputs if None.
The new cropped image [batch_shape,nh,nw,f]