def __init__(
        self,
        mem_size=200,
        n_classes=10,
        p_size=100,
        alpha=0.99,
        T=0.1,
        max_it_cnt=1,
    ):
        """
        :param mem_size: max number of input samples in the replay memory.
        :param n_classes: total number of classes that will be encountered. This
            is used to output predictions for all classes, with zero probability
            for unseen classes.
        :param p_size: The prototype size, which equals the feature size of the
            last layer.
        :param alpha: The momentum for the exponentially moving average of the
            prototypes.
        :param T: The softmax temperature, used as a concentration parameter.
        :param max_it_cnt: How many processing iterations per batch (experience)
        """
        super().__init__()
        self.n_classes = n_classes
        self.it_cnt = 0
        self.max_it_cnt = max_it_cnt

        # Operational memory: replay memory
        self.mem_size = mem_size  # replay memory size
        self.storage_policy = ClassBalancedBuffer(
            max_size=self.mem_size, adaptive_size=True
        )

        # Operational memory: Prototypical memory
        # Scales with nb classes * feature size
        self.p_mem: Dict[int, Tensor] = {}
        self.p_size = p_size  # Prototype size determined on runtime
        self.tmp_p_mem = {}  # Intermediate to process batch for multiple times
        self.alpha = alpha
        self.p_init_adaptive = False  # Only create proto when class seen

        # PPP-loss
        self.T = T
        self.ppp_loss = PPPloss(self.p_mem, T=self.T)

        self.initialized = False

        :param mem_size: max number of input samples in the replay memory.
        :param n_classes: total number of classes that will be encountered. This
            is used to output predictions for all classes, with zero probability
            for unseen classes.
        :param p_size: The prototype size, which equals the feature size of the
            last layer.
        :param alpha: The momentum for the exponentially moving average of the
            prototypes.
        :param T: The softmax temperature, used as a concentration parameter.
        :param max_it_cnt: How many processing iterations per batch (experience)
        
avalanche/training/plugins/cope.py