class_docstr: ER AML, as proposed in
  "New Insights on Reducing Abrupt Representation
  Change in Online Continual Learning"
  by Lucas Caccia et. al.
  https://openreview.net/forum?id=N8MaByOzUfb
class_docstr_tok: ["ER","AML",",","as","proposed","in","''","New","Insights","on","Reducing","Abrupt","Representation","Change","in","Online","Continual","Learning","''","by","Lucas","Caccia","et",".","al",".","https",":","\/\/openreview.net\/forum","?","id=N8MaByOzUfb"]
code: def _before_training_exp(self, **kwargs):
      # Update buffer before training exp so that we have current data in
      self.storage_policy.update(self, **kwargs)
      buffer = self.storage_policy.buffer
      if (
          len(buffer) >= self.batch_size_mem
          and self.experience.current_experience > 0
      ):
          self.replay_loader = cycle(
              torch.utils.data.DataLoader(
                  buffer,
                  batch_size=self.batch_size_mem,
                  shuffle=True,
                  drop_last=True,
              )
          )
          self.pos_neg_loaders = [
              cycle(
                  torch.utils.data.DataLoader(
                      group.buffer,
                      batch_size=self.train_mb_size,
                      shuffle=True,
                      drop_last=True,
                  )
              )
              for group in self.storage_policy.buffer_groups.values()
          ]
      super()._before_training_exp(**kwargs)
  
file_path: avalanche/avalanche/training/supervised/er_aml.py
imports: from typing import Callable, List, Optional, Union
  import torch
  from torch.nn import CrossEntropyLoss, Module
  from torch.optim import Optimizer
  from avalanche.core import SupervisedPlugin
  from avalanche.models.utils import avalanche_forward
  from avalanche.training import AMLCriterion
  from avalanche.training.plugins.evaluation import EvaluationPlugin, default_evaluator
  from avalanche.training.storage_policy import ClassBalancedBuffer
  from avalanche.training.templates import SupervisedTemplate
  from avalanche.training.utils import cycle
label_desc: Use image node_id 3 for calling the ER_AML obj's underlying member method code with example usage: obj._before_training_exp() without return types