UT3Weights.is_consistent_with#

t3toolbox.uniform_tucker_tensor_train.UT3Weights.is_consistent_with(x)#
def is_consistent_with(self, x: 'UniformTuckerTensorTrain') -> bool:

True iff these weights can be absorbed into x (non-raising).

Requires that the padded shapes fit and that the edge masks are equal.

The mask equality is the real content, and it is a check ragged does not need: ragged catches a rank mismatch as an einsum shape error (a length-n weight vector against a rank-n core), but uniform pads both to the common (n, r), so a mismatch is invisible to the shapes and would silently corrupt – a weight whose mask calls slot i padding carries a canonical zero there, and absorbing it would zero a real slot of x. The same precondition uniform adds to variation add/sub (docs/uniform_masks_vs_ranks.md).

Parameters:

x (UniformTuckerTensorTrain)

Return type:

bool