split(_:splitSizes:axis:name:)
Creates a split operation and returns the result tensor.
Declaration
func split(_ tensor: MPSGraphTensor, splitSizes: [NSNumber], axis: Int, name: String?) -> [MPSGraphTensor]Parameters
- tensor:
The input tensor.
- splitSizes:
The lengths of the result tensors along the split axis.
- axis:
The dimension along which MPSGraph splits the input tensor.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor object.
Discussion
Splits the input tensor along axis into multiple result tensors of size determined by splitSizes. Requires that the sum of splitSizes is equal to the lenth of the input along axis.