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
docstr: mem_size: int       : Fixed memory size
  subsample: int      : Size of the sample from which to look
                        for highest interfering exemplars
  batch_size_mem: int : Size of the batch sampled from
                        the bigger subsample batch
docstr_tok: ["mem_size",":","int",":","Fixed","memory","size","subsample",":","int",":","Size","of","the","sample","from","which","to","look","for","highest","interfering","exemplars","batch_size_mem",":","int",":","Size","of","the","batch","sampled","from","the","bigger","subsample","batch"]
code: def __init__(
      self,
      batch_size_mem: int,
      mem_size: int = 200,
      subsample: int = 200,
  ):
      """
      mem_size: int       : Fixed memory size
      subsample: int      : Size of the sample from which to look
                            for highest interfering exemplars
      batch_size_mem: int : Size of the batch sampled from
                            the bigger subsample batch
      """
      super().__init__()
      self.mem_size = mem_size
      self.subsample = subsample
      self.batch_size_mem = batch_size_mem
      self.storage_policy = ClassBalancedBuffer(
          max_size=self.mem_size, adaptive_size=True
      )
      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 1 to create a new MIRPlugin object from inherited base classes: SupervisedPlugin with example: obj = MIRPlugin(batch_size_mem, mem_size, subsample)