ajbrock / BigGAN-PyTorch

The author's officially unofficial PyTorch BigGAN implementation.
MIT License
2.84k stars 470 forks source link

"sh scripts/utils/prepare_data.sh" is not Working. #65

Closed H1R0Y4 closed 4 years ago

H1R0Y4 commented 4 years ago
 ~/W/C/C/BigGAN-PyTorch ❯❯❯ sh scripts/utils/prepare_data.sh
{'dataset': 'I128', 'data_root': 'data', 'batch_size': 256, 'num_workers': 16, 'chunk_size': 500, 'compression': False}
Using dataset root location data/ImageNet
Data will not be augmented...
Loading pre-saved Index file I128_imgs.npz...
Traceback (most recent call last):
  File "make_hdf5.py", line 110, in <module>
    main()
  File "make_hdf5.py", line 107, in main
    run(config)
  File "make_hdf5.py", line 63, in run
    **kwargs)[0]     
  File "/home/USER/WORK/CODE/CLONE/BigGAN-PyTorch/utils.py", line 566, in get_data_loaders
    load_in_mem=load_in_mem, **dataset_kwargs)
  File "/home/USER/WORK/CODE/CLONE/BigGAN-PyTorch/datasets.py", line 123, in __init__
    "Supported image extensions are: " + ",".join(IMG_EXTENSIONS)))
RuntimeError: Found 0 images in subfolders of: data/ImageNet
Supported image extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm
{'dataset': 'I128_hdf5', 'data_root': 'data', 'batch_size': 64, 'parallel': False, 'augment': False, 'num_workers': 8, 'shuffle': False, 'seed': 0}
Using dataset root location data/ILSVRC128.hdf5
Traceback (most recent call last):
  File "calculate_inception_moments.py", line 91, in <module>
    main()
  File "calculate_inception_moments.py", line 87, in main
    run(config)
  File "calculate_inception_moments.py", line 52, in run
    loaders = utils.get_data_loaders(**config)
  File "/home/USER/WORK/CODE/CLONE/BigGAN-PyTorch/utils.py", line 566, in get_data_loaders
    load_in_mem=load_in_mem, **dataset_kwargs)
  File "/home/USER/WORK/CODE/CLONE/BigGAN-PyTorch/datasets.py", line 190, in __init__
    self.num_imgs = len(h5.File(root, 'r')['labels'])
  File "/home/USER/.pyenv/versions/3.7.5/lib/python3.7/site-packages/h5py/_hl/files.py", line 408, in __init__
    swmr=swmr)
  File "/home/USER/.pyenv/versions/3.7.5/lib/python3.7/site-packages/h5py/_hl/files.py", line 173, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = 'data/ILSVRC128.hdf5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

How can I solve it?