-
Notifications
You must be signed in to change notification settings - Fork 71
关于多显卡运行项目报错的问题 #31
Description
如要使用多显卡训练,根据您的 hparam.py 的提示,需要修改:wavenet_batch_size、tacotron_batch_size、tacotron_synthesis_batch_size;
做了如下修改:
N=2 #在兩快显卡上跑
tacotron_num_gpus = 1N,
wavenet_num_gpus = 1N,
tacotron_batch_size = 32N
tacotron_synthesis_batch_size = 1N
运行命令:python train.py --model='Tacotron-2'
报错信息:
Loaded metadata for 10000 examples (11.87 hours)
Starting Synthesis
0%| | 0/5000 [00:00<?, ?it/s]Traceback (most recent call last):
File "/root/anaconda3/envs/py360/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 52, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
AttributeError: 'list' object has no attribute 'clip'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 138, in
main()
File "train.py", line 132, in main
train(args, log_dir, hparams)
File "train.py", line 67, in train
input_path = tacotron_synthesize(args, hparams, checkpoint)
File "/C_t2/tacotron/synthesize.py", line 137, in tacotron_synthesize
return run_synthesis(args, checkpoint_path, output_dir, hparams)
File "/C_t2/tacotron/synthesize.py", line 110, in run_synthesis
mel_output_filenames, speaker_ids = synth.synthesize(texts, basenames, synth_dir, None, mel_filenames)
File "/C_t2/tacotron/synthesizer.py", line 160, in synthesize
mels = np.clip(mels, T2_output_range[0], T2_output_range[1])
File "/root/anaconda3/envs/py360/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 1775, in clip
return _wrapfunc(a, 'clip', a_min, a_max, out=out)
File "/root/anaconda3/envs/py360/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 62, in _wrapfunc
return _wrapit(obj, method, *args, **kwds)
File "/root/anaconda3/envs/py360/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 42, in _wrapit
result = getattr(asarray(obj), method)(*args, **kwds)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()