MPSCNNInstanceNormalization(3) | MetalPerformanceShaders.framework | MPSCNNInstanceNormalization(3) |
MPSCNNInstanceNormalization
#import <MPSCNNInstanceNormalization.h>
Inherits MPSCNNKernel.
(nonnull instancetype) - initWithDevice:dataSource:
(nonnull instancetype) - initWithDevice:
(nullable instancetype) - initWithCoder:device:
(void) - reloadDataSource:
(void) - reloadGammaAndBetaFromDataSource
(void) - reloadGammaAndBetaWithCommandBuffer:gammaAndBetaState:
(MPSCNNInstanceNormalizationGradientState *__nullable) -
resultStateForSourceImage:sourceStates:destinationImage:
(MPSCNNInstanceNormalizationGradientState *__nullable) -
temporaryResultStateForCommandBuffer:sourceImage:sourceStates:destinationImage:
float epsilon
id< MPSCNNInstanceNormalizationDataSource > dataSource
This depends on Metal.framework This kernel normalizes each image, on a per-channel basis, to have zero mean and unit variance:
for each image: for each channel: y = (x - mean) * gamma / sqrt(variance + epsilon) + beta;
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:
Returns:
Reimplemented from MPSCNNKernel.
Use initWithDevice:dataSource instead
Reimplemented from MPSCNNKernel.
Initialize a MPSCNNInstanceNormalization kernel on a device.
Parameters:
Reload data using a data source.
Parameters:
Reinitialize the filter using the data source provided at kernel initialization.
Reload data using new gamma and beta terms contained within an MPSCNNInstanceNormalizationGradientState object.
Parameters:
Return a MPSCNNInstanceNormalizationGradientState object for the provided source image, source states, and destination image.
Reimplemented from MPSCNNKernel.
Return a temporary MPSCNNInstanceNormalizationGradientState object which may be used with a MPSCNNInstanceNormalization filter.
Reimplemented from MPSCNNKernel.
The data source that the object was initialized with
The epsilon value used to bias the variance when normalizing.
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |