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