chrisdonahue / wavegan

WaveGAN: Learn to synthesize raw audio with generative adversarial networks
MIT License
1.32k stars 283 forks source link

Issue with training flag --data_prefetch_gpu_num -1 #27

Closed saraalemadi closed 5 years ago

saraalemadi commented 5 years ago

I was only able to run the Wave Training without errors using the Flag --data_prefetch_gpu_num -1 (python3 train_wavegan.py train ./train --data_dir ./Data/data_to_gan --data_prefetch_gpu_num -1) otherwise I will get the following error: "wavegan/loader.py", line 192, in decode_extract_and_batch tf.data.experimental.prefetch_to_device( AttributeError: module 'tensorflow.data' has no attribute 'experimental' ". I have Tensorflow-gpu, does that mean its running on the CPU or the GPU since this flag is enabled " --data_prefetch_gpu_num -1 " ? Thanks

chrisdonahue commented 5 years ago

Try upgrade your tensorflow to 1.12.0. This is the only version I have tested the new data loader with..

You probably want to set this flag to 0 instead of 1 as the GPUs are 0-indexed (unless you are training on a machine with 2 GPUs and you want to use the second one)

Setting this flag to -1 does not guarantee training on CPU. The way to get training on the CPU is (I highly advise against training on CPU since it will take forever)

export CUDA_VISIBLE_DEVICES="-1"
python train_wavegan.py ... --data_prefetch_gpu_num -1