def prune(self, prune_proportion: float):
        """Prune a proportion of the unfrozen parameters from the module.

        The pruned parameters will be reused for the next task, while the
        remaining will be fine-tuned further on the current task, in the
        post-pruning phase.

        Prune may only be called when PackNet is in the `State.TRAINING` state.
        Prune will move PackNet to the `State.POST_PRUNE` state.

        :param prune_proportion: A proportion of the prunable parameters to
            prune. Must be between 0 and 1.
        """
        if not 0 <= prune_proportion <= 1:
            raise ValueError(
                f"`prune_proportion` must be between 0 and 1, got "
                f"{prune_proportion}"
            )
        self._state_guard(
            self.prune.__name__, [self.State.TRAINING], self.State.POST_PRUNE
        )
        self._prune(prune_proportion)
Prune a proportion of the unfrozen parameters from the module.

        The pruned parameters will be reused for the next task, while the
        remaining will be fine-tuned further on the current task, in the
        post-pruning phase.

        Prune may only be called when PackNet is in the `State.TRAINING` state.
        Prune will move PackNet to the `State.POST_PRUNE` state.

        :param prune_proportion: A proportion of the prunable parameters to
            prune. Must be between 0 and 1.
        
avalanche/models/packnet.py