---
title: "sigmoidGradient(withIncomingGradient:sourceTensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/sigmoidgradient(withincominggradient:sourcetensor:name:)"
---

# sigmoidGradient(withIncomingGradient:sourceTensor:name:)

Computes the gradient of the sigmoid function using the incoming gradient tensor.

## Declaration

```swift
func sigmoidGradient(withIncomingGradient gradient: MPSGraphTensor, sourceTensor source: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `gradient`: The incoming gradient tensor.
- `source`: The input tensor.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object
