def __init__(
        self,
        mem_size: int = 2000,
        batch_size: Optional[int] = None,
        batch_size_mem: Optional[int] = None,
        storage_policy: Optional[ExemplarsBuffer] = None,
    ):
        """
        :param mem_size: replay buffer size.
        :param batch_size: the size of the data batch. If set to `None`, it
            will be set equal to the strategy's batch size.
        :param batch_size_mem: the size of the memory batch. If its value is set
            to `None` (the default value), it will be automatically set equal to
            the data batch size.
        :param storage_policy: The policy that controls how to add new exemplars
            in memory.
        """

        super().__init__()
        self.mem_size = mem_size
        self.batch_size = batch_size
        self.batch_size_mem = batch_size_mem

        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 = ExperienceBalancedBuffer(
                max_size=self.mem_size, adaptive_size=True
            )

        # to store statistics for the classes as learned in the current incremental state
        self.current_classes_means = []
        # to store statistics for past classes as learned in the incremental state in which they were first seen
        self.init_classes_means = []
        # to store statistics for model confidence in different states (i.e. avg top-1 pred scores)
        self.models_confidence = []
        # to store the mapping between classes and the incremental state in which they were first seen
        self.classes2exp = []
        # total number of classes that will be seen
        self.n_classes = 0

        :param mem_size: replay buffer size.
        :param batch_size: the size of the data batch. If set to `None`, it
            will be set equal to the strategy's batch size.
        :param batch_size_mem: the size of the memory batch. If its value is set
            to `None` (the default value), it will be automatically set equal to
            the data batch size.
        :param storage_policy: The policy that controls how to add new exemplars
            in memory.
        
avalanche/training/plugins/il2m.py