module documentation
Infer conventional dimension labels for model tensor shapes.
| Function | make |
Create a likely tensor layout for a shape. |
Create a likely tensor layout for a shape.
The function recognizes common channel-first and channel-last image shapes. Unrecognized dimensions receive unused letters in alphabetical order.
Example
>>> make_default_layout([1, 3, 256, 256]) 'NCHW' >>> make_default_layout([1, 19, 7, 8]) 'NABC'
| Parameters | |
shape:list[ | Tensor dimensions. |
| Returns | |
str | Inferred layout with one letter per dimension. |