tensorly.cp_tensor.cp_norm

cp_norm(cp_tensor)[source]

Returns the l2 norm of a CP tensor

Parameters
cp_tensortl.CPTensor or (core, factors)
Returns
l2-normint

Notes

This is ||cp_to_tensor(factors)||^2

You can see this using the fact that khatria-rao(A, B)^T x khatri-rao(A, B) = A^T x A * B^T x B