---
title: "init(rate:seed:)"
framework: ML Compute
role: symbol
role_heading: Initializer
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: "mlcompute/mlcdropoutlayer/init(rate:seed:)"
---

# init(rate:seed:)

Creates a dropout layer with the probability rate and random number generator seed you specify.

## Declaration

```swift
convenience init(rate: Float, seed: Int)
```

## Parameters

- `rate`: The dropout rate you use for each element.
- `seed`: The seed you use to generate random numbers.
