Contents

dimensions

An array of sizes, in elements, one for each dimension of this tensor.

Declaration

var dimensions: MTLTensorExtents { get }

Discussion

You are responsible for ensuring dimensions meets the following requirements:

  • dimensions[i] must be greater than 0.

  • If dataType is a format MTLTensorDataType, dimensions[0] must be a multiple of 32 elements.

  • If the tensor has auxiliary planes, each dimension must be evenly divisible by its corresponding block factor.

  • If dataType is a format MTLTensorDataType, or the tensor has auxiliary planes, the tensor must have rank 1 or higher.

The default value of this property is a rank one extents with size one.