Closed shania7 closed 4 years ago
你好,
你似乎在 x_ = np.load(x_paths[i])
这里出错了。
不知道你是否事先处理好了数据? 如果没有的话,那么首先进行数据预处理。哪怕处理过,你也可以尝试重新预处理数据。
audio/convert_flac_2_wav.sh
把 .flac 格式的音频转化为 .wav 格式 (如果有必要)pre_process.py
来预处理数据,随后再train你好, 按照你的建议尝试重新预处理数据后,问题已解决,非常感谢!
您好,我基于train-clean-360数据集复现实验,在运行pretraining.py和train.py文件的时候,都出现了以下错误,请问该如何解决?诚盼回复~ Traceback (most recent call last):
File "", line 1, in
runfile('/Users/tongmeng/Desktop/speaker_recognition/code/TensorFlow-based_Deep_Speaker/Deep_Speaker-speaker_recognition_system-master-1/pretraining.py')
File "/anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile execfile(filename, namespace)
File "/anaconda3/lib/python3.6/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/tongmeng/Desktop/speaker_recognition/code/TensorFlow-based_Deep_Speaker/Deep_Speaker-speaker_recognition_system-master-1/pretraining.py", line 162, in
main()
File "/Users/tongmeng/Desktop/speaker_recognition/code/TensorFlow-based_Deep_Speaker/Deep_Speaker-speaker_recognition_system-master-1/pretraining.py", line 134, in main x_train, y_train = batchloader.next()
File "/Users/tongmeng/Desktop/speaker_recognition/code/TensorFlow-based_Deep_Speaker/Deep_Speaker-speaker_recognition_system-master-1/pretraining.py", line 49, in batchTrainingImageLoader x_train_t, y_train_t = loadFromList(paths, batch_start, batch_end, labels_to_id, no_of_speakers)
File "/Users/tongmeng/Desktop/speaker_recognition/code/TensorFlow-based_Deep_Speaker/Deep_Speaker-speaker_recognitionsystem-master-1/pretraining.py", line 28, in loadFromList x = np.load(x_paths[i])
File "/anaconda3/lib/python3.6/site-packages/numpy/lib/npyio.py", line 447, in load pickle_kwargs=pickle_kwargs)
File "/anaconda3/lib/python3.6/site-packages/numpy/lib/format.py", line 742, in read_array array.shape = shape
ValueError: cannot reshape array of size 29680 into shape (1269,64,1)