Only CPU available, GPU training breaks

Hi there, I was following the instructions of ljspeech example, when it came to training, if it’s “python train.py --config_path config.json”, it shows “using cuda:false” and the training is only on CPU.
If I do “CUDA_VISIBLE_DEVICES=0 python distribute.py”, it breaks immediately, only shows git hash and experiments folder.

I set up the environment by:
python setup.py install
pip install -r requirements.txt
sudo apt-get install espeak
sudo pip install librosa==0.5.1
(also tried python setup.py develop)

I used this project 3 months ago and it was all good. Would anyone help me out with problem?

Dont know what the issue is, but using CUDA_VISIBLE_DEVICES=0 means you are asking it to use the 0th gpu. If you dont have a gpu, it’s supposed to be CUDA_VISIBLE_DEVICES=-1. You dont really need this, you should just set cuda false in the config and relevant parts of the code.

This might not be related to your issue. Just wanted to let you know.

Hey, thanks for the information!

There are 10 GPUs available, and I tried different ones.

But can we set cuda to be true or false in config.json?

If you set CUDA_VIBILDE_DEVICES="" it uses cpu, if you set CUDA_VIBILDE_DEVICES=“1,3,4” it only uses the given GPUs and if you dont set it uses all GPUs available on the system.

However, if you are going to use more than one GPU you need to call distribute.py not train.py

Yes. You need to set your config according to your problem. Do not expect a random config to work well for your case. All of the parameters can be tuned.

Also, like erogol said, -1 or empty string uses gpu and if you give specific ids, then those GPU’s are used.