MPSNNImageNode(3) MetalPerformanceShaders.framework MPSNNImageNode(3)
NAME
MPSNNImageNode
SYNOPSIS
#import <MPSNNGraphNodes.h> Inherits NSObject. Instance Methods (nonnull instancetype) - initWithHandle: (nonnull instancetype) - init Class Methods (nonnull instancetype) + nodeWithHandle: (nonnull instancetype) + exportedNodeWithHandle: Properties id< MPSHandle > handle MPSImageFeatureChannelFormat format id< MPSImageAllocator > imageAllocator BOOL exportFromGraph
Detailed Description
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.
Method Documentation
+ (nonnull instancetype) exportedNodeWithHandle: (NSObject< MPSHandle > *__nullable) handle Create a autoreleased MPSNNImageNode with exportFromGraph = YES. Note: image is still temporary. See MPSNNImageNode.imageAllocator parameter. - (nonnull instancetype) init - (nonnull instancetype) initWithHandle: (NSObject< MPSHandle > *__nullable) handle + (nonnull instancetype) nodeWithHandle: (NSObject< MPSHandle > *__nullable) handle
Property Documentation
- (BOOL) exportFromGraph [read], [write], [nonatomic], [assign] Tag a image node for view later Most image nodes are private to the graph. These alias memory heavily and consequently generally have invalid state when the graph exists. 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 - (MPSImageFeatureChannelFormat) format [read], [write], [nonatomic], [assign] The preferred precision for the image Default: MPSImageFeatureChannelFormatNone, meaning MPS should pick a format Typically, this is 16-bit floating-point. - (id<MPSHandle>) handle [read], [write], [nonatomic], [retain] MPS resource identifier See MPSHandle protocol description. Default: nil - (id<MPSImageAllocator>) imageAllocator [read], [write], [nonatomic], [retain] Configurability for image allocation Allows you to influence how the image is allocated Default: defaultAllocator (MPSTemporaryImage)
Author
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-Thu2Jul 13 2017 MPSNNImageNode(3)
Mac OS X 10.12.6 - Generated Tue Oct 31 16:19:19 CDT 2017