code: def compute_stats(self, embedding):
      # calculate multivariate Gaussian distribution
      B, C, H, W = embedding.shape
      mean = paddle.mean(embedding, axis=0)
      embedding -= mean
      embedding = embedding.transpose((2, 3, 0, 1))  # hwbc
      inv_covariance = []  # paddle.zeros((H, W, C, C), dtype='float32')
      I = paddle.eye(C)
      for i in tqdm(range(H), desc="compute distribution stats"):
          inv_covariance.append(
              paddle.einsum(
                  "wbc, wbd -> wcd", embedding[i], embedding[i]
              )
              / (B - 1)
              + 0.01 * I
          )
          inv_covariance[-1] = cholesky_inverse(
              inv_covariance[-1]
          )  # paddle.inverse(inv_covariance[-1])#
      inv_covariance = (
          paddle.stack(inv_covariance)
          .reshape((H, W, C, C))
          .astype("float32")
      )
      self.set_dist_params(mean, inv_covariance)
  
imports: import numpy
  from tqdm import tqdm
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.vision.models.resnet import resnet18, resnet50, wide_resnet50_2
  from scipy.ndimage import gaussian_filter
  from qinspector.cvlib.workspace import register
  from qinspector.uad.utils.utils import cdist, cholesky_inverse, mahalanobis, mahalanobis_einsum, orthogonal, svd_orthogonal
  from qinspector.uad.utils.k_center_greedy import KCenterGreedy
label_desc: Use image node_id 14 for calling the PaDiMPlus obj's underlying member method code with example usage: obj.compute_stats(embedding) without return types