def data_setup(self):
        """
        if use ddp, use setup() not prepare_data(),
        prepare_data() only called on 1 GPU/TPU in distributed
        :return:
        """

        self.train_dataset = BlenderPerView(
            root_dir=self.conf['dataset.trainpath'],
            split=self.conf.get_string('dataset.train_split', default='train'),
            downSample=self.conf['dataset.imgScale_train'],
            N_rays=self.N_rays,
            batch_size=self.batch_size,
            clean_image=True,  # True for training
            importance_sample=self.conf.get_bool('dataset.importance_sample', default=False),
        )

        self.val_dataset = BlenderPerView(
            root_dir=self.conf['dataset.valpath'],
            split=self.conf.get_string('dataset.test_split', default='test'),
            downSample=self.conf['dataset.imgScale_test'],
            N_rays=self.N_rays,
            batch_size=self.batch_size,
            clean_image=self.conf.get_bool('dataset.mask_out_image',
                                           default=False) if self.mode != 'train' else False,
            importance_sample=self.conf.get_bool('dataset.importance_sample', default=False),
        )

        # item = self.train_dataset.__getitem__(0)
        self.train_dataloader = DataLoader(self.train_dataset,
                                           shuffle=True,
                                        #    num_workers=4 * self.batch_size,
                                           num_workers=4,
                                           batch_size=self.batch_size,
                                           pin_memory=True,
                                           drop_last=True
                                           )
        
        self.val_dataloader = DataLoader(self.val_dataset,
                                         shuffle=False,
                                        #  num_workers=4 * self.batch_size,
                                         num_workers=4,
                                         batch_size=self.batch_size,
                                         pin_memory=True,
                                         drop_last=False
                                         )

        self.val_dataloader_iterator = iter(self.val_dataloader)  # - should be after "reconstruct_metas_for_gru_fusion"

        if use ddp, use setup() not prepare_data(),
        prepare_data() only called on 1 GPU/TPU in distributed
        :return:
        
mv-diffusion/One-2-3-45-by-view/reconstruction/exp_runner_generic_blender_train.py