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
docstr: :param tukey: whether to use the tukey transforms
                (help get the distribution closer
                 to multivariate gaussian)
  :param shrinkage: whether to shrink the covariance matrices
  :param shrink1:
  :param shrink2:
  :param tukey1: power in tukey transforms
  :param covnorm: whether to normalize the covariance matrix
docstr_tok: [":","param","tukey",":","whether","to","use","the","tukey","transforms","(","help","get","the","distribution","closer","to","multivariate","gaussian",")",":","param","shrinkage",":","whether","to","shrink","the","covariance","matrices",":","param","shrink1",":",":","param","shrink2",":",":","param","tukey1",":","power","in","tukey","transforms",":","param","covnorm",":","whether","to","normalize","the","covariance","matrix"]
code: def __init__(
      self,
      tukey=True,
      shrinkage=True,
      shrink1: float = 1.0,
      shrink2: float = 1.0,
      tukey1: float = 0.5,
      covnorm=True,
  ):
      """
      :param tukey: whether to use the tukey transforms
                    (help get the distribution closer
                     to multivariate gaussian)
      :param shrinkage: whether to shrink the covariance matrices
      :param shrink1:
      :param shrink2:
      :param tukey1: power in tukey transforms
      :param covnorm: whether to normalize the covariance matrix
      """
      super().__init__()
      self.class_means_dict = {}
      self.class_cov_dict = {}
  
      self.register_buffer("class_means", None)
      self.register_buffer("class_covs", None)
  
      self.tukey = tukey
      self.shrinkage = shrinkage
      self.covnorm = covnorm
      self.shrink1 = shrink1
      self.shrink2 = shrink2
      self.tukey1 = tukey1
  
      self.max_class = -1
  
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 1 to create a new FeCAMClassifier object from inherited base classes: DynamicModule with example: obj = FeCAMClassifier(tukey, shrinkage, shrink1, shrink2, tukey1, covnorm)