Class RandomResizedCrop

  • All Implemented Interfaces:
    Transform

    public class RandomResizedCrop
    extends java.lang.Object
    implements Transform
    A Transform that crop the input image with random scale and aspect ratio.
    • Constructor Summary

      Constructors 
      Constructor Description
      RandomResizedCrop​(int width, int height, double minAreaScale, double maxAreaScale, double minAspectRatio, double maxAspectRatio)
      Creates a RandomResizedCrop Transform.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      NDArray transform​(NDArray array)
      Applies the Transform to the given NDArray.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RandomResizedCrop

        public RandomResizedCrop​(int width,
                                 int height,
                                 double minAreaScale,
                                 double maxAreaScale,
                                 double minAspectRatio,
                                 double maxAspectRatio)
        Creates a RandomResizedCrop Transform.
        Parameters:
        width - the output width of the image
        height - the output height of the image
        minAreaScale - minimum targetArea/srcArea value
        maxAreaScale - maximum targetArea/srcArea value
        minAspectRatio - minimum aspect ratio
        maxAspectRatio - maximum aspect ratio