<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCActivationLayer/relu6",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCActivationLayer(cpy)relu6Layer"
  },
  "title" : "relu6"
}
-->

# relu6

Creates an instance of a ReLU6 activation layer.

```
class var relu6: MLCActivationLayer { get }
```

## Discussion

This factory creates an activation descriptor using [`init(type:a:b:)`](/documentation/MLCompute/MLCActivationDescriptor/init(type:a:b:)), where `type =` [`MLCActivationType.relun`](/documentation/MLCompute/MLCActivationType/relun), `a = 0.0`, and `b = 6.0`, and passes that descriptor to [`init(descriptor:)`](/documentation/MLCompute/MLCActivationLayer/init(descriptor:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)