init(data:shape:stride:dataType:)
Creates a BNNSTensor that references the same memory as the specified UnsafeMutableRawBufferPointer.
Declaration
init(data: UnsafeMutableRawBufferPointer, shape: [Int], stride: [Int], dataType: BNNSDataType)Parameters
- data:
A pointer to the source data.
- shape:
The shape of the tensor.
- stride:
The stride of the tensor.