autonomousvision / giraffe

This repository contains the code for the CVPR 2021 paper "GIRAFFE: Representing Scenes as Compositional Generative Neural Feature Fields"
https://m-niemeyer.github.io/project-pages/giraffe/index.html
MIT License
1.24k stars 160 forks source link

Error when train the code #14

Closed diaodeyi closed 3 years ago

diaodeyi commented 3 years ago

Thanks for your great work, when i try to train the giraffe use the FFHQ , i meet a error:

(giraffe) ➜  giraffe-main python train.py configs/256res/ffhq_256.yaml           
/home/rjs/.conda/envs/giraffe/lib/python3.8/site-packages/kornia/augmentation/augmentation.py:1872: DeprecationWarning: GaussianBlur is no longer maintained and will be removed from the future versions. Please use RandomGaussianBlur instead.
  warnings.warn(
Start loading file addresses ...
done! time: 0.00021123886108398438
Number of images found: 0
Traceback (most recent call last):
  File "train.py", line 54, in <module>
    train_loader = torch.utils.data.DataLoader(
  File "/home/rjs/.conda/envs/giraffe/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 262, in __init__
    sampler = RandomSampler(dataset, generator=generator)  # type: ignore
  File "/home/rjs/.conda/envs/giraffe/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 103, in __init__
    raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0
diaodeyi commented 3 years ago

When i change the Shuffle (False) in the dataloder , it works. but the program stuck here with no GPU running:

      _(actvn): LeakyReLU(negative_slope=0.2, inplace=True)
    )
  )
)
[(levelname)s] Total number of parameters: 4299426
[(levelname)s] Total number of discriminator parameters: 2802432
[(levelname)s] Total number of generator parameters: 748497
m-niemeyer commented 3 years ago

Have you downloaded the dataset? As pointed out in the download script, we do not provide the images for FFHQ - you can find download links in the official repo.