tensorly.base.partial_vec_to_tensor

partial_vec_to_tensor(matrix, shape, skip_begin=1, skip_end=0)[source]

Refolds a partially vectorised tensor into a full one

Parameters:

matrix : ndarray

a partially vectorised tensor

shape : tuple

the shape of the original full tensor (including skipped dimensions)

skip_begin : int, optional, default is 1

number of dimensions to leave untouched at the beginning

skip_end : int, optional

number of dimensions to leave untouched at the end

Returns:

ndarray

full tensor