Contents

expandDims(_:axes:name:)

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

Declaration

func expandDims(_ tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor

Parameters

  • tensor:

    The input tensor.

  • axes:

    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.