expandDims(_:axis:name:)
Creates an expand-dimensions operation and returns the result tensor.
Declaration
func expandDims(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensorParameters
- tensor:
The input tensor.
- axis:
The axis to expand.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor object.
Discussion
Expands the tensor, inserting a dimension with size 1 at the specified axis.