def get_group_lengths(self, num_groups):
        """Compute groups lengths given the number of groups `num_groups`."""
        max_size = int(self.val_percentage * self.mem_size)
        lengths = [max_size // num_groups for _ in range(num_groups)]
        # distribute remaining size among experiences.
        rem = max_size - sum(lengths)
        for i in range(rem):
            lengths[i] += 1

        return lengths
Compute groups lengths given the number of groups `num_groups`.
avalanche/training/plugins/bic.py