MPSCNNBatchNormalizationNode(3) MetalPerformanceShaders.framework MPSCNNBatchNormalizationNode(3)

MPSCNNBatchNormalizationNode

#import <MPSNNGraphNodes.h>

Inherits MPSNNFilterNode.


(nonnull instancetype) - initWithSource:dataSource:


(nonnull instancetype) + nodeWithSource:dataSource:


MPSCNNBatchNormalizationFlags flags

A node representing batch normalization for inference or training Batch normalization operates differently for inference and training. For inference, the normalization is done according to a static statistical representation of data saved during training. For training, this representation is ever evolving. In the low level MPS batch normalization interface, during training, the batch normalization is broken up into two steps: calculation of the statistical representation of input data, followed by normalization once the statistics are known for the entire batch. These are MPSCNNBatchNormalizationStatistics and MPSCNNBatchNormalization, respectively.

When this node appears in a graph and is not required to produce a MPSCNNBatchNormalizationState -- that is, MPSCNNBatchNormalizationNode.resultState is not used within the graph -- then it operates in inference mode and new batch-only statistics are not calculated. When this state node is consumed, then the node is assumed to be in training mode and new statistics will be calculated and written to the MPSCNNBatchNormalizationState and passed along to the MPSCNNBatchNormalizationGradient and MPSCNNBatchNormalizationStatisticsGradient as necessary. This should allow you to construct an identical sequence of nodes for inference and training and expect the right thing to happen.

- (nonnull instancetype) initWithSource: (MPSNNImageNode *__nonnull) source(nonnull id< MPSCNNBatchNormalizationDataSource >) dataSource

- (MPSCNNBatchNormalizationFlags) flags [read], [write], [nonatomic], [assign]

Options controlling how batch normalization is calculated Default: MPSCNNBatchNormalizationFlagsDefault

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

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3