threshold(_:replacement:)
Creates an instance of a threshold activation layer using the threshold and replacement values you specify.
Declaration
class func threshold(_ threshold: Float, replacement: Float) -> SelfParameters
- threshold:
The threshold value.
- replacement:
The replacement value.
Return Value
A new MLCActivationLayer instance.
Discussion
The threshold(_:replacement:) factory type method creates an activation descriptor using init(type:a:b:), where type = MLCActivationType.threshold, a = threshold, and b = replacement, and passes that descriptor to init(descriptor:).