---
title: "dequantize(_:LUTTensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/dequantize(_:luttensor:name:)"
---

# dequantize(_:LUTTensor:name:)

Creates a lookup-table based quantization operation and returns the result tensor.

## Declaration

```swift
func dequantize(_ tensor: MPSGraphTensor, LUTTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `tensor`: Input tensor to be dequantized.
- `LUTTensor`: The lookup table to use - for u4 the last dimension should have 16 elements, and for u8 256 elements.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object.

## Discussion

Discussion Converts a u8 or u4 tensor to a float tensor by applying a lookup operation: result[i1,...,in] = LUTTensor[i1',...,in',tensor[i1,...,in]]. Note: The operation supports LUT groups up to the last 3 dimensions for tensor.
