ut3_sqrt_weights#

t3toolbox.backend.ut3_operations.ut3_sqrt_weights(weights)#
def ut3_sqrt_weights(
        weights: UT3WeightsData,  # (tucker_weight_supercore, tt_weight_supercore, masks)
) -> UT3WeightsData:              # sqrt(w) on the real slots; padding a canonical, finite 0; masks unchanged

Elementwise sqrt on the real slots (masks unchanged). The padding is neutralized rather than square-rooted: sqrt is fine at the canonical 0 but not differentiable there (an inf gradient), and garbage padding can be negative (nan). See _ut3_map_real_weights().

Parameters:

weights (UT3WeightsData)

Return type:

UT3WeightsData