ufv_apply_variations_masks#
- t3toolbox.backend.ufv_masking.ufv_apply_variations_masks(data)#
def ufv_apply_variations_masks( data: typ.Tuple[ NDArray, # tucker_variations_supercore, (d,)+stack_shape+(nD, N) NDArray, # tt_variations_supercore, (d,)+stack_shape+(rL, nU, rR) typ.Sequence[int], # shape = (N0,...,N(d-1)), static int tuple typ.Tuple[ NDArray, # variations_up_mask, dtype=bool, (d,)+stack_shape+(nU,) NDArray, # variations_down_mask, dtype=bool, (d,)+stack_shape+(nD,) NDArray, # variations_left_mask, dtype=bool, (d,)+stack_shape+(rL,) NDArray, # variations_right_mask, dtype=bool, (d,)+stack_shape+(rR,) ], ], ) -> typ.Tuple[ NDArray, # masked_tucker_variations_supercore NDArray, # masked_tt_variations_supercore ]:
Zero the padded (“garbage”) regions of the variation supercores via the edge masks.
shape_maskis reconstructed on the host from the staticshapeints (np, neverjnp).