tensorly.base.partial_tensor_to_vec

partial_tensor_to_vec(tensor, skip_begin=1, skip_end=0)[source]

Partially vectorises a tensor

Partially vectorises a tensor while ignoring the specified dimension at the beginning and the end
Parameters:

tensor : ndarray

tensor to partially vectorise

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

partially vectorised tensor with the skip_begin first and skip_end last dimensions untouched