squeeze(_:axis:name:)
Creates a squeeze operation and returns the result tensor.
Declaration
func squeeze(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensorParameters
- tensor:
The input tensor.
- axis:
The axis to squeeze.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor object.
Discussion
Squeezes the tensor, removing a dimension with size 1 at the specified axis. The size of the input tensor must be 1 at the specified axis.