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 update_class_cov_dict(
      self, class_cov_dict: Dict[int, Tensor], momentum: float = 0.5
  ):
      assert momentum <= 1 and momentum >= 0
      assert isinstance(class_cov_dict, dict), (
          "class_cov_dict must be a dictionary mapping class_id "
          "to mean vector"
      )
      for k, v in class_cov_dict.items():
          if (
              k not in self.class_cov_dict
              or (self.class_cov_dict[k] == 0).all()
          ):
              self.class_cov_dict[k] = class_cov_dict[k].clone()
          else:
              device = self.class_cov_dict[k].device
              self.class_cov_dict[k] = (
                  momentum * class_cov_dict[k].to(device)
                  + (1 - momentum) * self.class_cov_dict[k]
              )
      self._vectorize_cov_dict()
  
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 11 for calling the FeCAMClassifier obj's underlying member method code with example usage: obj.update_class_cov_dict(class_cov_dict, momentum) without return types