class_docstr: The CumulativeForgetting metric, describing the accuracy loss
  detected for a certain experience.
  
  This plugin metric, computed separately for each experience,
  is the difference between the cumulative accuracy result obtained after
  first training on a experience and the accuracy result obtained
  on the same experience at the end of successive experiences.
  
  This metric is computed during the eval phase only.
class_docstr_tok: ["The","CumulativeForgetting","metric",",","describing","the","accuracy","loss","detected","for","a","certain","experience",".","This","plugin","metric",",","computed","separately","for","each","experience",",","is","the","difference","between","the","cumulative","accuracy","result","obtained","after","first","training","on","a","experience","and","the","accuracy","result","obtained","on","the","same","experience","at","the","end","of","successive","experiences",".","This","metric","is","computed","during","the","eval","phase","only","."]
docstr: Creates an instance of the CumulativeForgetting metric.
docstr_tok: ["Creates","an","instance","of","the","CumulativeForgetting","metric","."]
code: def __init__(self, reset_at="stream", emit_at="stream", mode="eval"):
      """
      Creates an instance of the CumulativeForgetting metric.
      """
  
      self.classes_splits = {}
      self.classes_seen_so_far = set()
  
      self.initial = {}
      self.last = {}
  
      self.train_task_id = None
  
      super().__init__(
          CumulativeAccuracy(),
          reset_at=reset_at,
          emit_at=emit_at,
          mode=mode,
      )
  
imports: from collections import defaultdict
  from typing import Dict, List, Union, TYPE_CHECKING
  import numpy
  import torch
  from torch import Tensor
  from avalanche.benchmarks import OnlineCLExperience
  from avalanche.evaluation import GenericPluginMetric, Metric, PluginMetric
  from avalanche.evaluation.metrics.mean import Mean
  from avalanche.evaluation.metric_utils import phase_and_task, stream_type, generic_get_metric_name, default_metric_name_template
  from avalanche.evaluation.metric_results import MetricValue
label_desc: Use image node_id 1 to create a new CumulativeForgettingPluginMetric object from inherited base classes: GenericPluginMetric with example: obj = CumulativeForgettingPluginMetric(reset_at, emit_at, mode)