---
title: "resizeBilinear(_:sizeTensor:scaleTensor:offsetTensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/resizebilinear(_:sizetensor:scaletensor:offsettensor:name:)"
---

# resizeBilinear(_:sizeTensor:scaleTensor:offsetTensor:name:)

Creates a Resize operation and returns the result tensor.

## Declaration

```swift
func resizeBilinear(_ imagesTensor: MPSGraphTensor, sizeTensor size: MPSGraphTensor, scaleTensor scale: MPSGraphTensor, offsetTensor offset: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `imagesTensor`: Tensor containing input images.
- `size`: The target size of the result tensor. 1D Int32 or Int64 tensor of size equal to rank of input.
- `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 Resamples input images to given size using the provided scale and offset and bilinear sampling. Destination indices are computed using dst_indices = (src_indices * scale) + offset For most use cases passing the scale and offset directly is unnecessary, and it is preferable to use the API specifying centerResult and alignCorners.
