---
title: "dropout(_:rate:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/dropout(_:rate:name:)-16cq4"
---

# dropout(_:rate:name:)

Creates a dropout operation and returns the result

## Declaration

```swift
func dropout(_ tensor: MPSGraphTensor, rate: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `tensor`: Input tensor
- `rate`: The rate of values to be set to 0
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object

## Discussion

Discussion Removes values in the tensor with a percentage chance equal to rate. Removed values are set to 0
