dequantize(_:scaleTensor:dataType:name:)
Creates a dequantize operation and returns the result tensor.
Declaration
func dequantize(_ tensor: MPSGraphTensor, scaleTensor: MPSGraphTensor, dataType: MPSDataType, name: String?) -> MPSGraphTensorParameters
- tensor:
Input tensor to be dequantized.
- scaleTensor:
Scale Tensor parameter with groups support.
- dataType:
Float data type of the result tensor.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor array of datatype dataType.
Discussion
Converts the i8, u8, i4 or u4 tensor to a float tensor by applying a scale and bias transform:
result = scaleTensor * tensor.