---
title: flipZ
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Property
path: metalperformanceshadersgraph/mpsgraphgrudescriptor/flipz
---

# flipZ

A parameter that chooses between two variants for the final output computation.

## Declaration

```swift
var flipZ: Bool { get set }
```

## Discussion

Discussion If set to YES then the layer will compute the final value as h[t] = z[t] h[t-1] + (1-z[t]) o[t]. Otherwise it’s computed as h[t] = (1-z[t]) h[t-1] + z[t] o[t]. Default value: NO.
