.TH "MPSCNNInstanceNormalization" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSCNNInstanceNormalization .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits \fBMPSCNNKernel\fP\&. .SS "Instance Methods" .in +1c .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:dataSource:\fP" .br .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:\fP" .br .ti -1c .RI "(nullable instancetype) \- \fBinitWithCoder:device:\fP" .br .ti -1c .RI "(void) \- \fBreloadDataSource:\fP" .br .ti -1c .RI "(void) \- \fBreloadGammaAndBetaFromDataSource\fP" .br .ti -1c .RI "(void) \- \fBreloadGammaAndBetaWithCommandBuffer:gammaAndBetaState:\fP" .br .ti -1c .RI "(\fBMPSCNNInstanceNormalizationGradientState\fP *__nullable) \- \fBresultStateForSourceImage:sourceStates:destinationImage:\fP" .br .ti -1c .RI "(\fBMPSCNNInstanceNormalizationGradientState\fP *__nullable) \- \fBtemporaryResultStateForCommandBuffer:sourceImage:sourceStates:destinationImage:\fP" .br .in -1c .SS "Properties" .in +1c .ti -1c .RI "float \fBepsilon\fP" .br .ti -1c .RI "id< \fBMPSCNNInstanceNormalizationDataSource\fP > \fBdataSource\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP This depends on Metal\&.framework This kernel normalizes each image, on a per-channel basis, to have zero mean and unit variance: .PP for each image: for each channel: y = (x - mean) * gamma / sqrt(variance + epsilon) + beta; .SH "Method Documentation" .PP .SS "\- (nullable instancetype) \fBinitWithCoder:\fP (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device" \fBNSSecureCoding\fP 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\&. .PP \fBParameters:\fP .RS 4 \fIaDecoder\fP The NSCoder subclass with your serialized \fBMPSKernel\fP .br \fIdevice\fP The MTLDevice on which to make the \fBMPSKernel\fP .RE .PP \fBReturns:\fP .RS 4 \fBA\fP new \fBMPSCNNInstanceNormalization\fP object, or nil if failure\&. .RE .PP .PP Reimplemented from \fBMPSCNNKernel\fP\&. .SS "\- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device" Use initWithDevice:dataSource instead .PP Reimplemented from \fBMPSCNNKernel\fP\&. .SS "\- (nonnull instancetype) \fBinitWithDevice:\fP (nonnull id< MTLDevice >) device(nonnull id< \fBMPSCNNInstanceNormalizationDataSource\fP >) dataSource" Initialize a \fBMPSCNNInstanceNormalization\fP kernel on a device\&. .PP \fBParameters:\fP .RS 4 \fIdataSource\fP An object conforming to the \fBMPSCNNInstanceNormalizationDataSource\fP protocol which .RE .PP .SS "\- (void) reloadDataSource: (__nonnull id< \fBMPSCNNInstanceNormalizationDataSource\fP >) dataSource" Reload data using a data source\&. .PP \fBParameters:\fP .RS 4 \fIdataSource\fP The data source which will provide the gamma and beta terms to scale and bias the normalized result respectively\&. .RE .PP .SS "\- (void) reloadGammaAndBetaFromDataSource " Reinitialize the filter using the data source provided at kernel initialization\&. .SS "\- (void) reloadGammaAndBetaWithCommandBuffer: (__nonnull id< MTLCommandBuffer >) commandBuffer(\fBMPSCNNNormalizationGammaAndBetaState\fP *__nonnull) gammaAndBetaState" Reload data using new gamma and beta terms contained within an \fBMPSCNNInstanceNormalizationGradientState\fP object\&. .PP \fBParameters:\fP .RS 4 \fIcommandBuffer\fP The command buffer on which to encode the reload\&. .br \fIgammaAndBetaState\fP The state containing the updated weights which are to be reloaded\&. .RE .PP .SS "\- (\fBMPSCNNInstanceNormalizationGradientState\fP * __nullable) resultStateForSourceImage: (\fBMPSImage\fP *__nonnull) sourceImage(NSArray< \fBMPSState\fP * > *__nullable) sourceStates(\fBMPSImage\fP *__nonnull) destinationImage" Return a \fBMPSCNNInstanceNormalizationGradientState\fP object for the provided source image, source states, and destination image\&. .PP Reimplemented from \fBMPSCNNKernel\fP\&. .SS "\- (\fBMPSCNNInstanceNormalizationGradientState\fP * __nullable) temporaryResultStateForCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(\fBMPSImage\fP *__nonnull) sourceImage(NSArray< \fBMPSState\fP * > *__nullable) sourceStates(\fBMPSImage\fP *__nonnull) destinationImage" Return a temporary \fBMPSCNNInstanceNormalizationGradientState\fP object which may be used with a \fBMPSCNNInstanceNormalization\fP filter\&. .PP Reimplemented from \fBMPSCNNKernel\fP\&. .SH "Property Documentation" .PP .SS "\- (id<\fBMPSCNNInstanceNormalizationDataSource\fP>) dataSource\fC [read]\fP, \fC [nonatomic]\fP, \fC [retain]\fP" The data source that the object was initialized with .SS "\- epsilon\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" The epsilon value used to bias the variance when normalizing\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.