Contents

fillAll

The same as the ellipsis literal ... used to indicate unspecified dimensions of the tensor.

Declaration

static var fillAll: any MLTensorRangeExpression { get }

Discussion

For example:

let x = MLTensor(randomNormal: [1, 3, 28, 28], scalarType: Float.self)
let y = x[..., 0] // or x[.fillAll, 0]
y.shape // is [1, 3, 28]

See Also

Expanding and squeezing the tensor