TorchLean API

NN.Tensor.Internal.Elab.Pack

Elaboration of pack and unpack #

This module implements heterogeneous-rank pack and unpack. It preserves symbolic component dimensions, verifies fixed-axis agreement, proves exact segment partitioning, and returns the dependent tensor family dictated by the checked metadata.

Component ranks may differ. Scalar promotion chooses one common scalar type before constructing the family; unpack restores shapes, not the original pre-promotion scalar types. Symbolic dimensions still require a statically known shape-list structure.

Elaborate a nonempty heterogeneous component family to verified packing, returning the packed tensor together with exact star-shape metadata.

Instances For

    Elaborate the stored component shapes and return the heterogeneous component family certified by the reconstructed packed shape.

    Instances For