ReLUOperator
public class ReLUOperator: ActivationOperator
Rectified Linear Unit,
y=max(x,alpha=0.0)
-
hyperparameter, default is
0.0
Declaration
Swift
public var alpha: Float = 0.0
-
Convenience initializer Subclass required to override this function to assign
cpuComputeBlock
andmetalKernelFuncLabel
Declaration
Swift
required public convenience init(computationDelegate: OperatorCalculationDelegate? = nil)
Parameters
computationDelegate
computationDelegate
-
Initial by setting
alpha
valueDeclaration
Swift
public convenience init(computationDelegate: OperatorCalculationDelegate? = nil, alpha: Float)
Parameters
computationDelegate
computationDelegate description
alpha
alpha description
-
Attribute
alpha
as aScalarSymbol
.Declaration
Swift
public override func paramSymbols() -> [GraphSymbol]
Return Value
Array of GraphSymbol
-
Override CPU
Declaration
Swift
internal override func cpu()
-
Override GPU
Declaration
Swift
internal override func gpu()