---
title: "resizeBilinear(withGradientTensor:input:scale:offsetTensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/resizebilinear(withgradienttensor:input:scale:offsettensor:name:)"
---

# resizeBilinear(withGradientTensor:input:scale:offsetTensor:name:)

Creates a Resize gradient operation and returns the result tensor.

## Declaration

```swift
func resizeBilinear(withGradientTensor gradient: MPSGraphTensor, input: MPSGraphTensor, scale: MPSGraphTensor, offsetTensor offset: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `gradient`: Incoming gradient tensor
- `input`: Forward pass input tensor
- `scale`: 1D float tensor of size equal to rank of input.
- `offset`: 1D float tensor of size equal to rank of input.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object

## Discussion

Discussion Computes the gradient for the forward pass Resize op with bilinear sampling and identical parameters.
