class_docstr: Continual Prototype Evolution plugin.
  
  Each class has a prototype for nearest-neighbor classification.
  The prototypes are updated continually with an exponentially moving average,
  using class-balanced replay to keep the prototypes up-to-date.
  The embedding space is optimized using the PseudoPrototypicalProxy-loss,
  exploiting both prototypes and batch information.
  
  This plugin doesn't use task identities in training or eval
  (data incremental) and is designed for online learning (1 epoch per task).
docstr: After the forward we can use the representations to update our running
  avg of the prototypes. This is in case we do multiple iterations of
  processing on the same batch.
  
  New prototypes are initialized for previously unseen classes.
docstr_tok: ["After","the","forward","we","can","use","the","representations","to","update","our","running","avg","of","the","prototypes",".","This","is","in","case","we","do","multiple","iterations","of","processing","on","the","same","batch",".","New","prototypes","are","initialized","for","previously","unseen","classes","."]
code: def after_forward(self, strategy, **kwargs):
      """
      After the forward we can use the representations to update our running
      avg of the prototypes. This is in case we do multiple iterations of
      processing on the same batch.
  
      New prototypes are initialized for previously unseen classes.
      """
  
      if (
          self.p_init_adaptive
      ):  # Init prototypes for unseen classes in batch
          self._init_new_prototypes(strategy.mb_y)
  
      # Update batch info (when multiple iterations on same batch)
      self._update_running_prototypes(strategy)
  
imports: from typing import Dict
  import torch
  from torch import Tensor
  from torch.nn.functional import normalize
  from torch.nn.modules import Module
  from avalanche.training.utils import get_last_fc_layer, swap_last_fc_layer
  from avalanche.training.plugins.strategy_plugin import SupervisedPlugin
  from avalanche.training.storage_policy import ClassBalancedBuffer
  from avalanche.benchmarks.utils.data_loader import ReplayDataLoader
label_desc: Use image node_id 5 for calling the CoPEPlugin obj's underlying member method code with example usage: obj.after_forward(strategy) without return types