class_docstr: At the end of each experience, this plugin metric reports the average
  top-k accuracy for only the experiences
  that the model has been trained on so far.
  
  This metric only works at eval time.
class_docstr_tok: ["At","the","end","of","each","experience",",","this","plugin","metric","reports","the","average","top-k","accuracy","for","only","the","experiences","that","the","model","has","been","trained","on","so","far",".","This","metric","only","works","at","eval","time","."]
code: def after_training_exp(self, strategy):
      self._current_experience = strategy.experience.current_experience
      # Reset average after learning from a new experience
      self.reset(strategy)
      return super().after_training_exp(strategy)
  
imports: from typing import TYPE_CHECKING, List, Union, Dict
  import torch
  from torch import Tensor
  import torchmetrics
  from torchmetrics.functional import accuracy
  from avalanche.evaluation import Metric, GenericPluginMetric
  from avalanche.evaluation.metrics.mean import Mean
  from avalanche.evaluation.metric_utils import phase_and_task
  from collections import defaultdict
  from packaging import version
label_desc: Use image node_id 2 for calling the TrainedExperienceTopkAccuracy obj's underlying member method code with example usage: obj.after_training_exp(strategy) and returns: super