Contents

squeeze(_:name:)

Creates a squeeze operation and returns the result tensor.

Declaration

func squeeze(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor

Parameters

  • tensor:

    The input tensor.

  • name:

    The name for the operation.

Return Value

A valid MPSGraphTensor object.

Discussion

Squeezes the tensor, removing all dimensions with size 1.