class_docstr: FeCAMClassifier
  
  Similar to NCM but uses malahanobis distance instead of l2 distance
  
  This approach has been proposed for continual learning in
  "FeCAM: Exploiting the Heterogeneity of Class Distributions
  in Exemplar-Free Continual Learning" Goswami et. al.
  (Neurips 2023)
  
  This requires the storage of full per-class covariance matrices
code: def _normalize_cov(self, cov_mat):
      norm_cov_mat = {}
      for key, cov in cov_mat.items():
          sd = torch.sqrt(
              torch.diagonal(cov)
          )  # standard deviations of the variables
          cov = cov / (torch.matmul(sd.unsqueeze(1), sd.unsqueeze(0)))
          norm_cov_mat[key] = cov
  
      return norm_cov_mat
  
imports: import copy
  from typing import Dict
  import numpy
  import torch
  import torch.nn.functional
  import tqdm
  from torch import Tensor, nn
  from avalanche.models import DynamicModule
label_desc: Use image node_id 9 for calling the FeCAMClassifier obj's underlying member method code with example usage: obj._normalize_cov(cov_mat) and returns: norm_cov_mat