public class MPSNNImageNode extends NSObject
A placeholder node denoting the position of a MPSImage in a graph
MPS neural network graphs are made up of filter nodes connected by image (or state) nodes. An image node is produced by one filter but may be consumed by more than one filter.
Most image nodes will be created by MPS and made available through MPSNNFilterNode.resultImage. Image nodes that are not created by MPS (i.e. "the graph inputs") must be created by you.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
MPSNNImageNode(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static MPSNNImageNode |
alloc() |
static MPSNNImageNode |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
static MPSNNImageNode |
exportedNodeWithHandle(NSObject handle)
Create a autoreleased MPSNNImageNode with exportFromGraph = YES.
|
boolean |
exportFromGraph()
Tag a image node for view later
|
long |
format()
The preferred precision for the image
|
MPSHandle |
handle()
MPS resource identifier
|
static long |
hash_static() |
MPSImageAllocator |
imageAllocator()
Configurability for image allocation
|
MPSNNImageNode |
init() |
MPSNNImageNode |
initWithHandle(NSObject handle) |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static MPSNNImageNode |
new_objc() |
static MPSNNImageNode |
nodeWithHandle(NSObject handle) |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setExportFromGraph(boolean value)
Tag a image node for view later
|
void |
setFormat(long value)
The preferred precision for the image
|
void |
setHandle(MPSHandle value)
MPS resource identifier
|
void |
setImageAllocator(MPSImageAllocator value)
Configurability for image allocation
|
void |
setStopGradient(boolean value)
Stop training graph automatic creation at this node.
|
void |
setSynchronizeResource(boolean value)
Set to true to cause the resource to be synchronized with the CPU
|
static void |
setVersion_static(long aVersion) |
boolean |
stopGradient()
Stop training graph automatic creation at this node.
|
static org.moe.natj.objc.Class |
superclass_static() |
boolean |
synchronizeResource()
Set to true to cause the resource to be synchronized with the CPU
|
static long |
version_static() |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static MPSNNImageNode alloc()
public static MPSNNImageNode allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public boolean exportFromGraph()
Most image 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... intermediateImages:... list.
CAUTION: exporting an image 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 image. 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
public static MPSNNImageNode exportedNodeWithHandle(NSObject handle)
Note: image is still temporary. See MPSNNImageNode.imageAllocator parameter.
public long format()
Default: MPSImageFeatureChannelFormatNone, meaning MPS should pick a format Typically, this is 16-bit floating-point.
public MPSHandle handle()
See MPSHandle protocol description. Default: nil
public static long hash_static()
public MPSImageAllocator imageAllocator()
Allows you to influence how the image is allocated Default: MPSTemporaryImage.defaultAllocator
public MPSNNImageNode init()
public MPSNNImageNode initWithHandle(NSObject handle)
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static MPSNNImageNode new_objc()
public static MPSNNImageNode nodeWithHandle(NSObject handle)
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public void setExportFromGraph(boolean value)
Most image 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... intermediateImages:... list.
CAUTION: exporting an image 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 image. 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
public void setFormat(long value)
Default: MPSImageFeatureChannelFormatNone, meaning MPS should pick a format Typically, this is 16-bit floating-point.
public void setHandle(MPSHandle value)
See MPSHandle protocol description. Default: nil
public void setImageAllocator(MPSImageAllocator value)
Allows you to influence how the image is allocated Default: MPSTemporaryImage.defaultAllocator
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void setStopGradient(boolean value)
An inference graph of MPSNNFilterNodes, MPSNNStateNodes and MPSNNImageNodes can be automatically
converted to a training graph using -[MPSNNFilterNode trainingGraphWithSourceGradient:nodeHandler:].
Sometimes, an inference graph may contain extra nodes at start to do operations like resampling or range
adjustment that should not be part of the training graph. To prevent gradient operations for these extra
nodes from being included in the training graph, set
public void setSynchronizeResource(boolean value)
It is not needed on iOS/tvOS devices, where it does nothing.
public boolean stopGradient()
An inference graph of MPSNNFilterNodes, MPSNNStateNodes and MPSNNImageNodes can be automatically
converted to a training graph using -[MPSNNFilterNode trainingGraphWithSourceGradient:nodeHandler:].
Sometimes, an inference graph may contain extra nodes at start to do operations like resampling or range
adjustment that should not be part of the training graph. To prevent gradient operations for these extra
nodes from being included in the training graph, set
public boolean synchronizeResource()
It is not needed on iOS/tvOS devices, where it does nothing.