module documentation

Undocumented

Function make_default_layout Creates a default layout for the given shape.
def make_default_layout(shape: list[int]) -> str: ΒΆ

Creates a default layout for the given shape.

Tries to guess most common layouts for the given shape pattern. Otherwise, uses the first free letter of the alphabet for each dimension.

Example

>>> make_default_layout([1, 3, 256, 256])
>>> "NCHW"
>>> make_default_layout([1, 19, 7, 8])
>>> "NABC"