Contents

softShrink(a:)

Creates an instance of a soft shrink activation layer using the lambda value you specify for the soft shrink formation.

Declaration

class func softShrink(a: Float) -> Self

Parameters

  • a:

    The lambda value for the soft shrink formation.

Return Value

A new MLCActivationLayer instance.

Discussion

The softShrink(a:) factory type method creates an activation descriptor using init(type:a:), where type = MLCActivationType.softShrink and a = lambda, and passes that descriptor to init(descriptor:).

See Also

Factory Methods