Walleclipse / Deep_Speaker-speaker_recognition_system

Keras implementation of ‘’Deep Speaker: an End-to-End Neural Speaker Embedding System‘’ (speaker recognition)
246 stars 81 forks source link

您好! #7

Closed fangpengzhan closed 5 years ago

fangpengzhan commented 5 years ago

您好,最近我在研究您的这个deep speaker程序,准备用中文语料来训练,在完成pre_process后,训练train时,出现如下错误: forward process time 9.14s beginning to select.......... select best batch time 0.0675s select_batch_time: 9.400545120239258 2019-02-21 20:00:51,647 [INFO] train.py/main | == Presenting step #0 Traceback (most recent call last): File "train.py", line 182, in main() File "train.py", line 126, in main loss = model.train_on_batch(x, y) File "/anaconda3/lib/python3.5/site-packages/keras/engine/training.py", line 1808, in train_on_batch check_batch_axis=True) File "/anaconda3/lib/python3.5/site-packages/keras/engine/training.py", line 1411, in _standardize_user_data exception_prefix='target') File "/anaconda3/lib/python3.5/site-packages/keras/engine/training.py", line 153, in _standardize_input_data str(array.shape)) ValueError: Error when checking target: expected ln to have shape (None, 512) but got array with shape (96, 1) 找了半天,没发现原因,请教下需要怎么处理,期待您的回复~

fangpengzhan commented 5 years ago

您好,已找到问题,具体如下:

将train.py 123行改成 y = np.random.uniform(size=(x.shape[0], 512))

然后已经可以正常训练,期待训练的结果,再次感谢您!

Walleclipse commented 5 years ago

好的 谢谢! 我也学到了