fv_variation_shapes#
- t3toolbox.backend.fv_operations.fv_variation_shapes(frame)#
def fv_variation_shapes( frame: typ.Tuple, # (U, O, P, Q) frame data; len=d each, elm_shape=stack_shape+(...) ) -> VariationShapes: # (tucker_variation_shapes, tt_variation_shapes); WITHOUT the stack
The variation shapes of a frame:
(nD_i, N_i)per Tucker variation and(rL_i, nU_i, rR_i)per TT variation, read off the frame cores.The backend twin of the frontend
T3Frame.variation_shapes– and the ONE place the frame-to-variation axis convention is written down for the ragged layer. Frame bookkeeping is non-obvious (the TT variation takes its left bond from the core itself but its right bond from the core’s own trailing axis, which is the NEXT bond – the gauge shiftleft[:-1]/right[1:]in mask form), so open-coding these indices is how they drift. Feed the result tofv_variations_zeros()/fv_variations_randn().- Parameters:
frame (t3toolbox.backend.common.typ.Tuple)
- Return type:
VariationShapes