<MPSImageSizeEncodingState >(3)

NAME
<MPSImageSizeEncodingState >

SYNOPSIS

#import <MPSNeuralNetworkTypes.h>

Inherits <NSObject>.

  Properties
NSUInteger sourceWidth
NSUInteger sourceHeight

Detailed Description

MPSStates conforming to this protocol contain information about a image size elsewhere in the graph In some graphs a sequence of operations are done, then they are undone ins a series of 'reverse' operations. Examples might be pooling vs pooling gradient / upsampling, or convolution vs. convolution transpose. In such cases, the 'reverse' pass generally is converting from a smaller image to a larger image, and there is insufficient information to do this correctly. Several answers exist and we don't know which is correct.

As an example, consider trying to 'undo' integer division with a multiplication. The expression c = a/b is incomplete because there is also a remainder, which may constitute information lost. If we want to reconstitute a based on c and b, we need to use a = c * b + remainder, not just a = c*b. Similarly, when undoing a downsizing operation, we need the original size to find which answer in the range of a = c*b + [0,b-1] is the right one.

Property Documentation

  - (NSUInteger MPSImageSizeEncodingState) sourceHeight [read], [nonatomic], [assign]
The height of the source image passed to MPSCNNConvolution encode call.

  - (NSUInteger MPSImageSizeEncodingState) sourceWidth [read], [nonatomic], [assign]
The width of the source image passed to MPSCNNConvolution encode call.

Author

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.