Contents

init(_:alongAxis:)

Creates a tensor by stacking the given tensors along the specified axis.

Declaration

init(_ elements: some Collection<MLTensor>, alongAxis axis: Int = 0)

Parameters

  • axis:

    The axis along which to stack. Negative values wrap around.

See Also

Creating a tensor