docstr: Returns the l2 norm of a CP tensor
  
  Parameters
  ----------
  cp_tensor : tl.CPTensor or (core, factors)
  
  Returns
  -------
  l2-norm : int
  
  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
docstr_tok: ["Returns","the","l2","norm","of","a","CP","tensor","Parameters","--","--","--","--","--","cp_tensor",":","tl.CPTensor","or","(","core",",","factors",")","Returns","--","--","--","-","l2-norm",":","int","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"]
code: def norm(self):
      """Returns the l2 norm of a CP tensor
  
      Parameters
      ----------
      cp_tensor : tl.CPTensor or (core, factors)
  
      Returns
      -------
      l2-norm : int
  
      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
      """
      return cp_norm(self)
  
imports: from .None import backend
  from .base import fold, tensor_to_vec
  from ._factorized_tensor import FactorizedTensor
  from .tenalg import khatri_rao, unfolding_dot_khatri_rao
  from .metrics.factors import congruence_coefficient
  import numpy
label_desc: Use image node_id 12 for calling the CPTensor obj's underlying member method code with example usage: obj.norm() and returns: cp_norm