ut3_pad_ranks#
- t3toolbox.backend.ut3_operations.ut3_pad_ranks(data, n, r)#
def ut3_pad_ranks( data: UT3Data, n: int, # target padded Tucker rank (>= the current padded n) r: int, # target padded TT rank (>= the current padded r) ) -> UT3Data: # the same tensor, ranks and masks, stored at padded dims (n, r)
Zero-pad the rank dims of a uniform T3 to
(n, r)– the storage changes, the represented tensor, the ranks and the mask CONTENT do not (the new slots are padding: mask False, value 0). The inverse of the pad-shrinkingut3svddoes (which slices to the max rank it kept);utv_retractuses it to return a point at the frame’s padded dims, so the optimizers’ loop-invariant masks stay valid.- Parameters:
data (UT3Data)
n (int)
r (int)
- Return type:
UT3Data