dequantize(_:scale:zeroPoint:dataType:name:)
Creates Dequantize operation and returns the result tensor.
Declaration
func dequantize(_ tensor: MPSGraphTensor, scale: Double, zeroPoint: Double, dataType: MPSDataType, name: String?) -> MPSGraphTensorParameters
- tensor:
Input tensor to be dequantized
- scale:
Scale scalar parameter
- zeroPoint:
Bias scalar parameter (converted to dataType of tensor)
- dataType:
Float data type of the result tensor.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor array of datatype dataType
Discussion
Convert the i8 or u8 tensor to a float tensor by applying a scale + bias transform: result = scale(tensor - zeroPoint)