ut3_concatenate_weights#
- t3toolbox.backend.ut3_operations.ut3_concatenate_weights(weights_A, weights_B)#
def ut3_concatenate_weights( weights_A: UT3WeightsData, # (tucker_weight_supercore, tt_weight_supercore, masks) weights_B: UT3WeightsData, # (tucker_weight_supercore, tt_weight_supercore, masks) ) -> UT3WeightsData: # per-edge concatenation: padded widths ADD, masks concatenate
Per-edge concatenation of two uniform weights – the
+/ direct-sum combine, where ranks add. Uniform twin oft3_concatenate_weights, and the weight-side partner ofut3_add(which concatenates the object’s rank masks in exactly the same way).Both the padded supercores and the masks concatenate on the last axis, so the output’s padded width is
nA + nBand its real rank isrank_A + rank_B.The output mask can go gappy, and that is correct (
docs/uniform_masks_vs_ranks.md): ifA’s mask has slack (real rank below its padded width), the concatenation leaves a hole betweenA’s real slots andB’s block. The data stays put – no compaction – andut3weights_to_t3weightsgathers through the holes. Re-canonicalize with the SVD if a prefix form is wanted.Neither operand’s real slots move, so no masking is needed: the supercores are copied, not reduced, and each output slot comes from exactly one input slot (garbage padding stays in the padding).
- Parameters:
weights_A (UT3WeightsData)
weights_B (UT3WeightsData)
- Return type:
UT3WeightsData