---
title: softShrink
framework: ML Compute
role: symbol
role_heading: Type Property
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlcactivationlayer/softshrink
---

# softShrink

Creates an instance of a soft shrink activation layer.

## Declaration

```swift
class var softShrink: MLCActivationLayer { get }
```

## Discussion

Discussion This factory creates an activation descriptor using init(type:a:), where type = MLCActivationType.softShrink and a = 0.5, and passes that descriptor to init(descriptor:).

## See Also

### Factory Properties

- [absolute](mlcompute/mlcactivationlayer/absolute.md)
- [celu](mlcompute/mlcactivationlayer/celu.md)
- [elu](mlcompute/mlcactivationlayer/elu.md)
- [gelu](mlcompute/mlcactivationlayer/gelu.md)
- [hardShrink](mlcompute/mlcactivationlayer/hardshrink.md)
- [hardSigmoid](mlcompute/mlcactivationlayer/hardsigmoid.md)
- [hardSwish](mlcompute/mlcactivationlayer/hardswish.md)
- [leakyReLU](mlcompute/mlcactivationlayer/leakyrelu.md)
- [logSigmoid](mlcompute/mlcactivationlayer/logsigmoid.md)
- [relu](mlcompute/mlcactivationlayer/relu.md)
- [relu6](mlcompute/mlcactivationlayer/relu6.md)
- [selu](mlcompute/mlcactivationlayer/selu.md)
- [sigmoid](mlcompute/mlcactivationlayer/sigmoid.md)
- [softPlus](mlcompute/mlcactivationlayer/softplus.md)
- [softSign](mlcompute/mlcactivationlayer/softsign.md)
