constant(_:dataType:)
Creates a constant operation and returns the result tensor.
Declaration
func constant(_ scalar: Double, dataType: MPSDataType) -> MPSGraphTensorParameters
- scalar:
The scalar value to fill the entire tensor values with.
- dataType:
The dataType of the constant tensor.
Return Value
A valid MPSGraphTensor object.