stack(_:axis:name:)
Creates a stack operation and returns the result tensor.
Declaration
func stack(_ inputTensors: [MPSGraphTensor], axis: Int, name: String?) -> MPSGraphTensorParameters
- inputTensors:
The input tensors.
- axis:
The dimension to stack tensors into result. Must be in range:
-rank + 1 <= dimension < rank + 1. - name:
The name for the operation.
Return Value
A valid MPSGraphTensor object.
Discussion
Stacks all input tensors along axis into a result tensor of rank + 1. Tensors must be broadcast compatible along all dimensions except axis, and have the same type.