def __init__(self, stage_params: list):
        """
        stage_params is a list of dicts
        e.g. stage_params = [
            {'resolution': 4, 'epochs': 50}, # 32 x 32
            {'resolution': 2, 'epochs': 30}, # 64 x 64
            {'resolution': 1, 'epochs': 20}, # 128 x 128
        ]
        """
        super().__init__()
        assert len(stage_params) > 0, 'No stages specified'
        assert all([{'resolution', 'epochs'} <= set(stage.keys()) for stage in stage_params]), \
            'stage_params must contain keys: resolution and epochs'

        self.stage_params = stage_params
        self.stage_epochs_cume = np.cumsum([stage['epochs'] for stage in stage_params])

        self._current_stage = 0

        stage_params is a list of dicts
        e.g. stage_params = [
            {'resolution': 4, 'epochs': 50}, # 32 x 32
            {'resolution': 2, 'epochs': 30}, # 64 x 64
            {'resolution': 1, 'epochs': 20}, # 128 x 128
        ]
        
analyze/convnexts4nd/src/callbacks/progressive_resizing.py