Class MPSNNStateNode

  • All Implemented Interfaces:
    NSObject
    Direct Known Subclasses:
    MPSNNBinaryGradientStateNode, MPSNNGradientStateNode, MPSNNLabelsNode, MPSNNMultiaryGradientStateNode

    public class MPSNNStateNode
    extends NSObject
    MPSNNStateNode A placeholder node denoting the position in the graph of a MPSState object Some filters need additional information about an image in order to function. For example a max-pooling gradient filter needs to know which position the max result came from in the original pooling filter in order to select the right data for gradient computation. In other cases, state may be moved into a MPSState object in order to keep the filter itself immutable. The MPSState object typically encapsulates one or more MTLResource objects.
    • Constructor Detail

      • MPSNNStateNode

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

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

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

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

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

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

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

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

        public MPSHandle handle()
        MPS resource identification See MPSHandle protocol reference. Default: nil
      • hash_static

        public static long hash_static()
      • 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)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

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

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

        public void setHandle​(MPSHandle value)
        MPS resource identification See MPSHandle protocol reference. Default: nil
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long version_static()
      • exportFromGraph

        public boolean exportFromGraph()
        Tag a state node for view later Most state nodes are private to the graph. These alias memory heavily and consequently generally have invalid state when the graph exits. When exportFromGraph = YES, the image is preserved and made available through the [MPSNNGraph encode... resultStates:... list. CAUTION: exporting an state from a graph prevents MPS from recycling memory. It will nearly always cause the amount of memory used by the graph to increase by the size of the state. There will probably be a performance regression accordingly. This feature should generally be used only when the node is needed as an input for further work and recomputing it is prohibitively costly. Default: NO
      • setExportFromGraph

        public void setExportFromGraph​(boolean value)
        Tag a state node for view later Most state nodes are private to the graph. These alias memory heavily and consequently generally have invalid state when the graph exits. When exportFromGraph = YES, the image is preserved and made available through the [MPSNNGraph encode... resultStates:... list. CAUTION: exporting an state from a graph prevents MPS from recycling memory. It will nearly always cause the amount of memory used by the graph to increase by the size of the state. There will probably be a performance regression accordingly. This feature should generally be used only when the node is needed as an input for further work and recomputing it is prohibitively costly. Default: NO
      • setSynchronizeResource

        public void setSynchronizeResource​(boolean value)
        Set to true to cause the resource to be synchronized with the CPU Ignored on non-MacOS.
      • synchronizeResource

        public boolean synchronizeResource()
        Set to true to cause the resource to be synchronized with the CPU Ignored on non-MacOS.