def __init__(
        self,
        batch_size_mem: int,
        mem_size: int = 200,
        opt_lr: float = 0.1,
        name_ext_layer: str = None,
        use_adversarial_replay: bool = True,
        beta_coef: float = 0.4,
        decay_factor_fgsm: float = 1.0,
        epsilon_fgsm: float = 0.0314,
        iter_fgsm: int = 2,
        storage_policy: Optional["ReservoirSamplingBuffer"] = None,
    ):
        """
        :param batch_size_mem: Size of the batch sampled from
                                 the bigger buffer
        :param mem_size: Fixed memory size
        :param opt_lr: Learning rate of the internal optimizer
        :param name_ext_layer: Name of the layer to extract features
        :param use_adversarial_replay: Boolean to use or not RAR
        :param beta_coef: float: coef between RAR and Buffer
        :param decay_factor_fgsm: Decay factor of FGSM
        :param epsilon_fgsm: Epsilon for FGSM
        :param iter_fgsm: Number of iterations of FGSM
        :param storage_policy: Storage Policy used for the buffer
        """
        super().__init__()
        self.mem_size = mem_size
        self.batch_size_mem = batch_size_mem
        self.opt_lr = opt_lr
        self.name_ext_layer = name_ext_layer

        self.use_adversarial_replay = use_adversarial_replay

        self.beta_coef = beta_coef
        # For Split-CIFAR10: 0.5, 0.1, 0.075 - mem size 200, 500 , 1000
        # Split-CIFAR100 and Split-miniImageNet: 0.4

        # FGSM
        self.decay_factor_fgsm = decay_factor_fgsm
        self.epsilon_fgsm = epsilon_fgsm
        self.iter_fgsm = iter_fgsm

        self.replay_loader = None

        if not self.use_adversarial_replay:
            self.beta_coef = 0

        if storage_policy is not None:  # Use other storage policy
            self.storage_policy = storage_policy
            assert storage_policy.max_size == self.mem_size
        else:  # Default
            self.storage_policy = ReservoirSamplingBuffer(max_size=self.mem_size)

        :param batch_size_mem: Size of the batch sampled from
                                 the bigger buffer
        :param mem_size: Fixed memory size
        :param opt_lr: Learning rate of the internal optimizer
        :param name_ext_layer: Name of the layer to extract features
        :param use_adversarial_replay: Boolean to use or not RAR
        :param beta_coef: float: coef between RAR and Buffer
        :param decay_factor_fgsm: Decay factor of FGSM
        :param epsilon_fgsm: Epsilon for FGSM
        :param iter_fgsm: Number of iterations of FGSM
        :param storage_policy: Storage Policy used for the buffer
        
avalanche/training/plugins/rar.py