MPSCNNNeuronPReLUNode(3) MetalPerformanceShaders.framework MPSCNNNeuronPReLUNode(3)

MPSCNNNeuronPReLUNode

#import <MPSNNGraphNodes.h>

Inherits MPSCNNNeuronNode.


(nonnull instancetype) - initWithSource:aData:
(nonnull instancetype) - initWithSource:


(nonnull instancetype) + nodeWithSource:aData:
(nonnull instancetype) + nodeWithSource:

A ReLU node with parameter a provided independently for each feature channel For each pixel, applies the following function:


f(x) = x if x >= 0
= aData[i] * x if x < 0, i is the index of the feature channel @param sourceNode The MPSNNImageNode representing the source MPSImage for the filter @param aData An array of single precision floating-point alpha values to use

- (nonnull instancetype) initWithSource: (MPSNNImageNode *__nonnull) sourceNode

- (nonnull instancetype) initWithSource: (MPSNNImageNode *__nonnull) sourceNode(NSData *__nonnull) aData

Init a node representing a MPSCNNNeuronTanH kernel For each pixel, applies the following function:

f(x) = x                if x >= 0

= aData[i] * x if x < 0, i is the index of the feature channel

Parameters:

sourceNode The MPSNNImageNode representing the source MPSImage for the filter
aData An array of single precision floating-point alpha values to use

Returns:

A new MPSNNFilter node for a MPSCNNNeuronTanH kernel.

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

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3