Contents

setInputDimensions(_:bufferIndex:)

Sets the dimension of an input tensor at a buffer index.

Declaration

func setInputDimensions(_ dimensions: MTLTensorExtents?, bufferIndex: Int)

Parameters

  • dimensions:

    The dimensions of the tensor.

  • bufferIndex:

    Index of the tensor to modify.

Discussion

When the compiled model declares the input as unranked (unknown rank), any concrete dimensions are accepted. Otherwise dimensions.rank must equal the model’s input rank, and each static (non -1) dimension must match.