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.
code: def load_state_dict(self, state_dict, strict: bool = True):
      self.class_means = state_dict["class_means"]
      super().load_state_dict(state_dict, strict)
      # fill dictionary
      if self.class_means is not None:
          for i in range(self.class_means.shape[0]):
              if (self.class_means[i] != 0).any():
                  self.class_means_dict[i] = self.class_means[i].clone()
      self.max_class = max(self.class_means_dict.keys())
  
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 2 for calling the NCMClassifier obj's underlying member method code with example usage: obj.load_state_dict(state_dict, strict) without return types