class_docstr: NCM Classifier.
  NCMClassifier performs nearest class mean classification
  measuring the distance between the input tensor and the
  ones stored in 'self.class_means'.
  
  Before being used for inference, NCMClassifier needs to
  be updated with a mean vector per class, by calling
  `update_class_means_dict`.
  
  This class registers a `class_means` buffer that stores
  the class means in a single tensor of shape
  [max_class_id_seen, feature_size]. Classes with ID smaller
  than `max_class_id_seen` are associated with a 0-vector.
docstr: Replace existing dictionary of means with a given dictionary.
docstr_tok: ["Replace","existing","dictionary","of","means","with","a","given","dictionary","."]
code: def replace_class_means_dict(
      self, class_means_dict: Dict[int, Tensor]
  ):
      """
      Replace existing dictionary of means with a given dictionary.
      """
      assert isinstance(class_means_dict, dict), (
          "class_means_dict must be a dictionary mapping class_id "
          "to mean vector"
      )
      self.class_means_dict = {
          k: v.clone() for k, v in class_means_dict.items()
      }
      self._vectorize_means_dict()
  
file_path: avalanche/avalanche/models/ncm_classifier.py
imports: from typing import Dict
  import torch
  from torch import Tensor, nn
  from avalanche.models import DynamicModule
label_desc: Use image node_id 6 for calling the NCMClassifier obj's underlying member method code with example usage: obj.replace_class_means_dict(class_means_dict) without return types