class_docstr: A wrapper class for the PARAFAC2 decomposition.
code: def __init__(self, parafac2_tensor):
      super().__init__()
  
      shape, rank = _validate_parafac2_tensor(parafac2_tensor)
      weights, factors, projections = parafac2_tensor
  
      if weights is None:
          weights = T.ones(rank, **T.context(factors[0]))
  
      self.shape = shape
      self.rank = rank
      self.factors = factors
      self.weights = weights
      self.projections = projections
  
imports: from .None import backend
  from .base import unfold, tensor_to_vec
  from ._factorized_tensor import FactorizedTensor
label_desc: Use image node_id 1 to create a new Parafac2Tensor object from inherited base classes: FactorizedTensor with example: obj = Parafac2Tensor(parafac2_tensor)