NDArrayDescriptor
A description of an array’s shape, scalar type, and memory layout expectations.
Declaration
struct NDArrayDescriptorOverview
You obtain an NDArrayDescriptor from an InferenceFunctionDescriptor by querying the descriptor of a specific input or output:
let valueDescriptor = functionDescriptor.inputDescriptor(of: "x")!
guard case .ndArray(let ndArrayDescriptor) = valueDescriptor else { ... }The descriptor contains the expectations for an array value that you provide to an InferenceFunction. Most expectations are strict: for example, if the descriptor specifies scalarType as .float32, the array you provide must use .float32.