def set_phase(self, stage_params=[224], val_upsample=False, test_upsample=False):
        """
        For progresive learning.
        Will modify train transform parameters during training, just image size for now,
        and create a new train dataset, which the train_dataloader will load every
        n epochs (in config).

        Later, will be possible to change magnitude of RandAug here too, and mixup alpha

        stage_params: list, list of values to change.  single [image_size] for now
        """

        img_size = int(stage_params[0])

        # self.train_transforms["input_size"] = img_size

        if val_upsample:
            self.val_transforms["input_size"] = img_size

        train_transforms = (self.train_transform() if self.train_transforms is None
                            else self.hydra.utils.instantiate(self.train_transforms))
        val_transforms = (self.val_transform() if self.val_transforms is None
                            else self.hydra.utils.instantiate(self.val_transforms))

        if self.loader_fft:
            train_transforms = torchvision.transforms.Compose(
                train_transforms.transforms + [
                    torchvision.transforms.Lambda(lambda x: torch.fft.rfftn(x, s=tuple([2*l for l in x.shape[1:]])))
                ]
            )
            val_transforms = torchvision.transforms.Compose(
                val_transforms.transforms + [
                    torchvision.transforms.Lambda(lambda x: torch.fft.rfftn(x, s=tuple([2*l for l in x.shape[1:]])))
                ]
            )

        self.dataset_train = self.ImageFolder(self.dir_path / 'train',
                                            transform=train_transforms)

        if self.val_split > 0.:
            # this will create the val split
            self.split_train_val(self.val_split)
        # will use the test split as val by default
        else:
            self.dataset_val = self.ImageFolder(self.dir_path / 'val', transform=val_transforms)

        # # modded, override (for debugging)
        # self.dataset_train = self.dataset_val

        # not sure if normally you upsample test also
        if test_upsample:
            self.test_transforms["input_size"] = img_size
            test_transforms = (self.val_transform() if self.test_transforms is None
                                else self.hydra.utils.instantiate(self.test_transforms))
            self.dataset_test = self.ImageFolder(os.path.join(self.dir_path, 'val'), transform=test_transforms)
            ## modded, override (for debugging)
            # self.dataset_test = self.dataset_val

        # could modify mixup by reinstantiating self.mixup_fn (later maybe)

        For progresive learning.
        Will modify train transform parameters during training, just image size for now,
        and create a new train dataset, which the train_dataloader will load every
        n epochs (in config).

        Later, will be possible to change magnitude of RandAug here too, and mixup alpha

        stage_params: list, list of values to change.  single [image_size] for now
        
analyze/convnexts4nd/src/dataloaders/vision.py