Contents

expandDims(_:axesTensor:name:)

Creates an expand-dimensions operation and returns the result tensor.

Declaration

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

Parameters

  • tensor:

    The input tensor.

  • axesTensor:

    The tensor containing the axes to expand.

  • name:

    The name for the operation.

Return Value

A valid MPSGraphTensor object.

Discussion

Expands the tensor, inserting dimensions with size 1 at specified axes.