init(_:rank:)
Initializes a tensor data with an MPS vector enforcing rank of the result.
Declaration
init(_ vector: MPSVector, rank: Int)Parameters
- vector:
MPSVector to be used within the MPSGraphTensorData
- rank:
The rank of the resulting TensorData tensor. NOTE: must be within { 1, … ,16 }.
Return Value
A valid MPSGraphTensorData, or nil if allocation failure.
Discussion
The device of the MPSVector will be used to get the MPSDevice for this MPSGraphTensorData.