Class MPSGraphPooling2DOpDescriptor

  • All Implemented Interfaces:
    NSCopying, NSObject

    public class MPSGraphPooling2DOpDescriptor
    extends MPSGraphObject
    implements NSCopying
    This class defines parameters for a 2d pooling operation. Use this descriptor with the following methods: ``MPSGraph/maxPooling2DWithSourceTensor:descriptor:name:``, ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:``, ``MPSGraph/maxPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name:``, ``MPSGraph/maxPooling2DGradientWithGradientTensor:indicesTensor:outputShape:descriptor:name:``, ``MPSGraph/maxPooling2DGradientWithGradientTensor:indicesTensor:outputShapeTensor:descriptor:name:``, ``MPSGraph/avgPooling2DWithSourceTensor:descriptor:name:`` and ``MPSGraph/avgPooling2DGradientWithGradientTensor:sourceTensor:descriptor:name:``. API-Since: 14.0
    • Constructor Detail

      • MPSGraphPooling2DOpDescriptor

        protected MPSGraphPooling2DOpDescriptor​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • ceilMode

        public boolean ceilMode()
        Affects how MPSGraph computes the output size: if set to `YES` then output size is computed by rounding up instead of down when dividing input size by stride. Default value: `NO`. API-Since: 15.0
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • dataLayout

        public long dataLayout()
        Defines the data layout of the input data (in forward pass). See: ``MPSGraphTensorNamedDataLayout``.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • descriptorWithKernelWidthKernelHeightStrideInXStrideInYDilationRateInXDilationRateInYPaddingLeftPaddingRightPaddingTopPaddingBottomPaddingStyleDataLayout

        public static MPSGraphPooling2DOpDescriptor descriptorWithKernelWidthKernelHeightStrideInXStrideInYDilationRateInXDilationRateInYPaddingLeftPaddingRightPaddingTopPaddingBottomPaddingStyleDataLayout​(long kernelWidth,
                                                                                                                                                                                                              long kernelHeight,
                                                                                                                                                                                                              long strideInX,
                                                                                                                                                                                                              long strideInY,
                                                                                                                                                                                                              long dilationRateInX,
                                                                                                                                                                                                              long dilationRateInY,
                                                                                                                                                                                                              long paddingLeft,
                                                                                                                                                                                                              long paddingRight,
                                                                                                                                                                                                              long paddingTop,
                                                                                                                                                                                                              long paddingBottom,
                                                                                                                                                                                                              long paddingStyle,
                                                                                                                                                                                                              long dataLayout)
        Creates a 2d pooling descriptor with given values. - Parameters: - kernelWidth: See `kernelWidth` property. - kernelHeight: See `kernelHeight` property. - strideInX: See `strideInX` property. - strideInY: See `strideInY` property. - dilationRateInX: See `dilationRateInX` property. - dilationRateInY: See `dilationRateInY` property. - paddingLeft: See `paddingLeft` property. - paddingRight: See `paddingRight` property. - paddingTop: See `paddingTop` property. - paddingBottom: See `paddingBottom` property. - paddingStyle: See `paddingStyle` property. - dataLayout: See `dataLayout` property. - Returns: The descriptor on autoreleasepool.
      • descriptorWithKernelWidthKernelHeightStrideInXStrideInYPaddingStyleDataLayout

        public static MPSGraphPooling2DOpDescriptor descriptorWithKernelWidthKernelHeightStrideInXStrideInYPaddingStyleDataLayout​(long kernelWidth,
                                                                                                                                  long kernelHeight,
                                                                                                                                  long strideInX,
                                                                                                                                  long strideInY,
                                                                                                                                  long paddingStyle,
                                                                                                                                  long dataLayout)
        Creates a 2d pooling descriptor with given values. - Parameters: - kernelWidth: See `kernelWidth` property. - kernelHeight: See `kernelHeight`` property. - strideInX: See `strideInX` property. - strideInY: See `strideInY` property. - paddingStyle: See `paddingStyle` property. - dataLayout: See `dataLayout` property. - Returns: The descriptor on autoreleasepool.
      • dilationRateInX

        public long dilationRateInX()
        Defines the dilation rate for the X (Width) dimension. Default value: 1.
      • dilationRateInY

        public long dilationRateInY()
        Defines the dilation rate for the Y (Height) dimension. Default value: 1.
      • hash_static

        public static long hash_static()
      • includeZeroPadToAverage

        public boolean includeZeroPadToAverage()
        Defines for average pooling a mode where samples outside the input tensor count as zeroes in the average computation. Otherwise the result is sum over samples divided by number of samples that didn't come from padding. Default value: `NO`. API-Since: 15.0
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • kernelHeight

        public long kernelHeight()
        Defines the pooling window size for the Y (Height) dimension.
      • kernelWidth

        public long kernelWidth()
        Defines the pooling window size for the X (Width) dimension.
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • paddingBottom

        public long paddingBottom()
        Defines the explicit padding value for the Y (Height) dimension to add after the data. Default value: 0.
      • paddingLeft

        public long paddingLeft()
        Defines the explicit padding value for the X (Width) dimension to add before the data. Default value: 0.
      • paddingRight

        public long paddingRight()
        Defines the explicit padding value for theX (Width) dimension to add after the data. Default value: 0.
      • paddingStyle

        public long paddingStyle()
        Defines what kind of padding MPSGraph applies to the operation. Default value: `MPSGraphPaddingStyleExplicit`.
      • paddingTop

        public long paddingTop()
        Defines the explicit padding value for the Y (Height) dimension to add before the data. Default value: 0.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setCeilMode

        public void setCeilMode​(boolean value)
        Affects how MPSGraph computes the output size: if set to `YES` then output size is computed by rounding up instead of down when dividing input size by stride. Default value: `NO`. API-Since: 15.0
      • setDataLayout

        public void setDataLayout​(long value)
        Defines the data layout of the input data (in forward pass). See: ``MPSGraphTensorNamedDataLayout``.
      • setDilationRateInX

        public void setDilationRateInX​(long value)
        Defines the dilation rate for the X (Width) dimension. Default value: 1.
      • setDilationRateInY

        public void setDilationRateInY​(long value)
        Defines the dilation rate for the Y (Height) dimension. Default value: 1.
      • setExplicitPaddingWithPaddingLeftPaddingRightPaddingTopPaddingBottom

        public void setExplicitPaddingWithPaddingLeftPaddingRightPaddingTopPaddingBottom​(long paddingLeft,
                                                                                         long paddingRight,
                                                                                         long paddingTop,
                                                                                         long paddingBottom)
        Sets the explicit padding values and sets `paddingStyle` to `MPSGraphPaddingStyleExplicit`. - Parameters: - paddingLeft: See `paddingLeft` property. - paddingRight: See `paddingRight` property. - paddingTop: See `paddingTop` property. - paddingBottom: See `paddingBottom` property.
      • setIncludeZeroPadToAverage

        public void setIncludeZeroPadToAverage​(boolean value)
        Defines for average pooling a mode where samples outside the input tensor count as zeroes in the average computation. Otherwise the result is sum over samples divided by number of samples that didn't come from padding. Default value: `NO`. API-Since: 15.0
      • setKernelHeight

        public void setKernelHeight​(long value)
        Defines the pooling window size for the Y (Height) dimension.
      • setKernelWidth

        public void setKernelWidth​(long value)
        Defines the pooling window size for the X (Width) dimension.
      • setPaddingBottom

        public void setPaddingBottom​(long value)
        Defines the explicit padding value for the Y (Height) dimension to add after the data. Default value: 0.
      • setPaddingLeft

        public void setPaddingLeft​(long value)
        Defines the explicit padding value for the X (Width) dimension to add before the data. Default value: 0.
      • setPaddingRight

        public void setPaddingRight​(long value)
        Defines the explicit padding value for theX (Width) dimension to add after the data. Default value: 0.
      • setPaddingStyle

        public void setPaddingStyle​(long value)
        Defines what kind of padding MPSGraph applies to the operation. Default value: `MPSGraphPaddingStyleExplicit`.
      • setPaddingTop

        public void setPaddingTop​(long value)
        Defines the explicit padding value for the Y (Height) dimension to add before the data. Default value: 0.
      • setStrideInX

        public void setStrideInX​(long value)
        Defines the stride for the X (Width) dimension. Default value: 1.
      • setStrideInY

        public void setStrideInY​(long value)
        Defines the stride for the Y (Height) dimension. Default value: 1.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • strideInX

        public long strideInX()
        Defines the stride for the X (Width) dimension. Default value: 1.
      • strideInY

        public long strideInY()
        Defines the stride for the Y (Height) dimension. Default value: 1.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • returnIndicesDataType

        public int returnIndicesDataType()
        Defines the data type for returned indices. Use this in conjunction with ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:`` API. Currently MPSGraph supports the following datatypes: `MPSDataTypeInt32`. Default value: `MPSDataTypeInt32`. API-Since: 15.3
      • returnIndicesMode

        public long returnIndicesMode()
        Defines the mode for returned indices of maximum values within each pooling window. Use this in conjunction with ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:`` API. If `returnIndicesMode = MPSGraphPoolingReturnIndicesNone` then only the first result MPSGraph returns from ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:`` will be valid and using the second result will assert. Default value: `MPSGraphPoolingReturnIndicesNone`. API-Since: 15.3
      • setReturnIndicesDataType

        public void setReturnIndicesDataType​(int value)
        Defines the data type for returned indices. Use this in conjunction with ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:`` API. Currently MPSGraph supports the following datatypes: `MPSDataTypeInt32`. Default value: `MPSDataTypeInt32`. API-Since: 15.3
      • setReturnIndicesMode

        public void setReturnIndicesMode​(long value)
        Defines the mode for returned indices of maximum values within each pooling window. Use this in conjunction with ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:`` API. If `returnIndicesMode = MPSGraphPoolingReturnIndicesNone` then only the first result MPSGraph returns from ``MPSGraph/maxPooling2DReturnIndicesWithSourceTensor:descriptor:name:`` will be valid and using the second result will assert. Default value: `MPSGraphPoolingReturnIndicesNone`. API-Since: 15.3
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.