init(device:data:shape:dataType:)
Initializes the tensor data with an NSData on a device.
Declaration
init(device: MPSGraphDevice, data: Data, shape: [NSNumber], dataType: MPSDataType)Parameters
- device:
MPSDevice on which the MPSGraphTensorData exists
- data:
NSData from which to copy the contents
- shape:
Shape of the output tensor
- dataType:
dataType of the placeholder tensor
Return Value
A valid MPSGraphTensorData, or nil if allocation failure.