Turns the Khatri-product of matrices into a full tensor
factor_matrices = [|U_1, ... U_n|]becomes a tensor shape
(U.shape, U.shape, ... U[-1].shape)
factors : ndarray list
list of factor matrices, all with the same number of columns i.e. for all matrix U in factor_matrices: U has shape
(s_i, R), where R is fixed and s_i varies with i
full tensor of shape
(U.shape, ... U[-1].shape)
This version works by first computing the mode-0 unfolding of the tensor and then refolding it.
There are other possible and equivalent alternate implementation, e.g. summing over r and updating an outer product of vectors.