Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mpscnnbatchnormalizationstate(3) [mojave man page]

MPSCNNBatchNormalizationState(3)			 MetalPerformanceShaders.framework			  MPSCNNBatchNormalizationState(3)

NAME
MPSCNNBatchNormalizationState SYNOPSIS
#import <MPSCNNBatchNormalization.h> Inherits MPSState. Instance Methods (nonnull instancetype) - initWithResource: (void) - reset (nullable id< MTLBuffer >) - mean (nullable id< MTLBuffer >) - variance (nullable id< MTLBuffer >) - gradientForGamma (nullable id< MTLBuffer >) - gradientForBeta Class Methods (nonnull instancetype) + temporaryStateWithCommandBuffer:bufferSize: (__nonnull instancetype) + temporaryStateWithCommandBuffer:textureDescriptor: Properties MPSCNNBatchNormalization * batchNormalization MPSCNNNormalizationGammaAndBetaState * gammaAndBetaState Detailed Description MPSCNNBatchNormalizationState encapsulates the data necessary to execute batch normalization. MPSCNNBatchNormalizationState cannot initialize the size of its own underlying resources. Use [MPSCNNBatchNormalizationStatistics resultStateForSourceImages:] or [MPSCNNBatchNormalizationStatistics temporaryResultStateForCommandBuffer:sourceImages:]. Method Documentation - (nullable id<MTLBuffer>) gradientForBeta Return an MTLBuffer object containing the values of the gradient of the loss function with respect to the bias terms. If a MPSCNNBatchNormalizationGradient kernel has not successfully generated these values nil will be returned. - (nullable id<MTLBuffer>) gradientForGamma Return an MTLBuffer object containing the values of the gradient of the loss function with respect to the scale factors. If a MPSCNNBatchNormalizationGradient kernel has not successfully generated these values nil will be returned. - (nonnull instancetype) initWithResource: (__nullable id< MTLResource >) resource Unavailable. Use MPSCNNBatchNormalizationStatistics methods to initialize the state object. Reimplemented from MPSState. - (nullable id<MTLBuffer>) mean Return an MTLBuffer object with the most recently computed batch mean values. - (void) reset Reset any accumulated state data to its initial values. + (nonnull instancetype) temporaryStateWithCommandBuffer: (__nonnull id< MTLCommandBuffer >) cmdBuf(size_t) bufferSize Unavailable. Use MPSCNNBatchNormalizationStatistics methods to create the temporary state object. Reimplemented from MPSState. + (__nonnull instancetype) temporaryStateWithCommandBuffer: (__nonnull id< MTLCommandBuffer >) cmdBuf(MTLTextureDescriptor *__nonnull) descriptor Create a MPSState holding a temporary MTLTexture Parameters: cmdBuf The command buffer against which the temporary resource is allocated descriptor A descriptor for the new temporary texture Reimplemented from MPSState. - (nullable id<MTLBuffer>) variance Return an MTLBuffer object with the most recently computed batch variance values. Property Documentation - (MPSCNNBatchNormalization*) batchNormalization [read], [nonatomic], [retain] - (MPSCNNNormalizationGammaAndBetaState*) gammaAndBetaState [read], [nonatomic], [retain] Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNBatchNormalizationState(3)

Check Out this Related Man Page

MPSCNNBatchNormalizationStatistics(3)			 MetalPerformanceShaders.framework		     MPSCNNBatchNormalizationStatistics(3)

NAME
MPSCNNBatchNormalizationStatistics SYNOPSIS
#import <MPSCNNBatchNormalization.h> Inherits MPSCNNKernel. Instance Methods (nonnull instancetype) - initWithDevice: (nullable instancetype) - initWithCoder:device: (void) - encodeBatchToCommandBuffer:sourceImages:batchNormalizationState: (void) - encodeBatchToCommandBuffer:sourceImages:destinationImages: (void) - encodeToCommandBuffer:sourceImage:destinationImage: (MPSImage *__nonnull) - encodeToCommandBuffer:sourceImage: (MPSImageBatch *__nonnull) - encodeBatchToCommandBuffer:sourceImages: Additional Inherited Members Detailed Description This depends on Metal.framework MPSCNNBatchNormalizationStatistics updates a MPSCNNBatchNormalizationState with the batch statistics necessary to perform a batch normalization. MPSCNNBatchNormalizationStatistics may be executed multiple times with multiple images to accumulate all the statistics necessary to perform a batch normalization as described in https://arxiv.org/pdf/1502.03167v3.pdf. Method Documentation - (MPSImageBatch * __nonnull) encodeBatchToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSImageBatch *__nonnull) sourceImages Encode a MPSCNNKernel into a command Buffer. Create a texture to hold the result and return it. In the first iteration on this method, encodeToCommandBuffer:sourceImage:destinationImage: some work was left for the developer to do in the form of correctly setting the offset property and sizing the result buffer. With the introduction of the padding policy (see padding property) the filter can do this work itself. If you would like to have some input into what sort of MPSImage (e.g. temporary vs. regular) or what size it is or where it is allocated, you may set the destinationImageAllocator to allocate the image yourself. This method uses the MPSNNPadding padding property to figure out how to size the result image and to set the offset property. See discussion in MPSNeuralNetworkTypes.h. All images in a batch must have MPSImage.numberOfImages = 1. Parameters: commandBuffer The command buffer sourceImages A MPSImages to use as the source images for the filter. Returns: An array of MPSImages or MPSTemporaryImages allocated per the destinationImageAllocator containing the output of the graph. The offset property will be adjusted to reflect the offset used during the encode. The returned images will be automatically released when the command buffer completes. If you want to keep them around for longer, retain the images. Reimplemented from MPSCNNKernel. - (void) encodeBatchToCommandBuffer: (__nonnull id< MTLCommandBuffer >) commandBuffer(MPSImageBatch *__nonnull) sourceImages(MPSCNNBatchNormalizationState *__nonnull) batchNormalizationState Encode this operation to a command buffer. Parameters: commandBuffer The command buffer. sourceImages An MPSImageBatch containing the source images. batchNormalizationState A valid MPSCNNBatchNormalizationState object which will be updated with the image batch statistics. - (void) encodeBatchToCommandBuffer: (__nonnull id< MTLCommandBuffer >) commandBuffer(MPSImageBatch *__nonnull) sourceImages(MPSImageBatch *__nonnull) destinationImages - (MPSImage * __nonnull) encodeToCommandBuffer: (__nonnull id< MTLCommandBuffer >) commandBuffer(MPSImage *__nonnull) sourceImage - (void) encodeToCommandBuffer: (__nonnull id< MTLCommandBuffer >) commandBuffer(MPSImage *__nonnull) sourceImage(MPSImage *__nonnull) destinationImage - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. Parameters: aDecoder The NSCoder subclass with your serialized MPSKernel device The MTLDevice on which to make the MPSKernel Returns: A new MPSCNNBatchNormalizationStatistics object, or nil if failure. Reimplemented from MPSCNNKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device Initialize this kernel on a device. Parameters: device The MTLDevice on which to initialize the kernel. Reimplemented from MPSCNNKernel. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSCNNBatchNormalizationStatistics(3)
Man Page