complexConstant(realPart:imaginaryPart:shape:dataType:)
Creates a complex constant op with a given shape and returns the result tensor.
Declaration
func complexConstant(realPart: Double, imaginaryPart: Double, shape: [NSNumber], dataType: MPSDataType) -> MPSGraphTensorParameters
- realPart:
The real part of the complex scalar to fill the entire tensor values with.
- imaginaryPart:
The imaginary part of the complex scalar to fill the entire tensor values with.
- shape:
The shape of the output tensor. This has to be statically shaped.
- dataType:
The dataType of the constant tensor.
Return Value
A valid MPSGraphTensor object.