DataLens icon indicating copy to clipboard operation
DataLens copied to clipboard

No such file or directory '../../data/celebA/celebA-trn-x-lg-ups-0.pkl'

Open llbbcc opened this issue 3 years ago • 2 comments

Hi! I have finished the training process on MNIST and FashionMNIST datasets, but when I set the dataset parameters to celeba-gender-train, I get the following error No such file or directory '../../data/celebA/celebA-trn-x-lg-ups-0.pkl', could you tell me how to get those .pkl files. Thanks!

llbbcc avatar Feb 24 '22 04:02 llbbcc

Hi @llbbcc,

I am not the owner or contributor of this repository, but I have some experience using it. Maybe it helps you.

I have two suggestions for you.

First of all, make sure that you have already downloaded celebA data using download.py.

Second of all, which I guess is the source of the problem, the below snippet from model.py is using a hard-coded path (../../data/celebA/), and is not reading from self.data_dir like MNIST and FMNIST.

Therefore, I guess by putting the downloaded data to the expected directory or changing their source code the problem will be solved.

    def load_batch_celebA_gender(self, mode='train'):
        celebA_directory = '../../data/celebA/'
        import joblib
        from tqdm import tqdm

        if mode == 'train':
            train_x = np.zeros((189018 + 22818, 64, 64, 3))
            dim = 0
            for i in tqdm(range(20)):
                x = joblib.load(celebA_directory + f'celebA-trn-x-lg-ups-{i}.pkl')

feknall avatar Feb 24 '22 17:02 feknall

Hi @llbbcc,

I am not the owner or contributor of this repository, but I have some experience using it. Maybe it helps you.

I have two suggestions for you.

First of all, make sure that you have already downloaded celebA data using download.py.

Second of all, which I guess is the source of the problem, the below snippet from model.py is using a hard-coded path (../../data/celebA/), and is not reading from self.data_dir like MNIST and FMNIST.

Therefore, I guess by putting the downloaded data to the expected directory or changing their source code the problem will be solved.

    def load_batch_celebA_gender(self, mode='train'):
        celebA_directory = '../../data/celebA/'
        import joblib
        from tqdm import tqdm

        if mode == 'train':
            train_x = np.zeros((189018 + 22818, 64, 64, 3))
            dim = 0
            for i in tqdm(range(20)):
                x = joblib.load(celebA_directory + f'celebA-trn-x-lg-ups-{i}.pkl')

Thanks for your reply. There is no download code for celebA in download.py. Before running, I have downloaded the dataset celebA and changed the path to my own. This error still occurs.

llbbcc avatar Feb 25 '22 01:02 llbbcc

We are unable to provide the dataset as it is licensed. However, feel free to follow the protocol according to our paper to preprocess the celebA dataset and reproduce our results. Thanks!

boxin-wbx avatar Oct 25 '23 19:10 boxin-wbx