Skip to main content

Module tensor

Module tensor 

Source
Expand description

Tensor types for zero-copy data exchange with CoreML.

Structs§

BorrowedTensor
OwnedTensor

Enums§

DataType
Numeric data types supported by CoreML tensors.

Traits§

AsMultiArray

Functions§

compute_strides
Computes row-major strides for a tensor with the given shape.
element_count
Returns the total number of elements for a tensor with the given shape.
validate_shape
Validates that data_len matches the element count implied by shape.