Contents

hardShrink(a:)

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

Declaration

class func hardShrink(a: Float) -> Self

Parameters

  • a:

    The lambda for the hard shrink formation.

Return Value

A new MLCActivationLayer instance.

Discussion

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

See Also

Factory Methods