<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSCNNNeuronTanH",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSCNNNeuronTanH"
  },
  "title" : "MPSCNNNeuronTanH"
}
-->

# MPSCNNNeuronTanH

A hyperbolic tangent neuron filter.

```
class MPSCNNNeuronTanH
```

## Overview

For each pixel in an image, the filter applies the following function:

![f(x) = a * tanh(b * x)](images/com.apple.metalperformanceshaders/media-2903548@2x.png)

## Topics

### Initializers

[`init(device:a:b:)`](/documentation/MetalPerformanceShaders/MPSCNNNeuronTanH/init(device:a:b:))

Initializes a hyperbolic tangent neuron filter.



---

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)