Skip to main content

Shape

Type Alias Shape 

Source
pub type Shape = SmallVec<[SInt; 4]>;
Expand description

Shape type - sequence of symbolic integers.

Uses SmallVec with inline capacity of 4 to avoid heap allocation for common tensor ranks (1D-4D), which covers 99% of ML workloads.

Can contain mix of concrete and symbolic dimensions.

Aliased Typeยง

pub struct Shape { /* private fields */ }