class_docstr: Maximally Interfered Retrieval plugin,
  Implements the strategy defined in
  "Online Continual Learning with Maximally Interfered Retrieval"
  https://arxiv.org/abs/1908.04742
  
  This strategy has been designed and tested in the
  Online Setting (OnlineCLScenario). However, it
  can also be used in non-online scenarios
code: def after_training_exp(
      self, strategy: "SupervisedTemplate", **kwargs
  ):
      self.storage_policy.update(strategy, **kwargs)
      # Exclude classes that were in the last batch
      buffer = concat_datasets(
          [
              self.storage_policy.buffer_groups[key].buffer
              for key, _ in self.storage_policy.buffer_groups.items()
              if int(key) not in torch.unique(strategy.mb_y).cpu()
          ]
      )
      if len(buffer) > self.batch_size_mem:
          self.replay_loader = cycle(
              torch.utils.data.DataLoader(
                  buffer,
                  batch_size=self.subsample,
                  shuffle=True,
              )
          )
      else:
          self.replay_loader = None
  
file_path: avalanche/avalanche/training/plugins/mir.py
imports: import copy
  from typing import TYPE_CHECKING
  import torch
  from avalanche.benchmarks.utils import concat_datasets
  from avalanche.models.utils import avalanche_forward
  from avalanche.training.plugins.strategy_plugin import SupervisedPlugin
  from avalanche.training.storage_policy import ClassBalancedBuffer
label_desc: Use image node_id 3 for calling the MIRPlugin obj's underlying member method code with example usage: obj.after_training_exp(strategy) without return types