Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好! #7

Closed
fangpengzhan opened this issue Feb 21, 2019 · 2 comments
Closed

您好! #7

fangpengzhan opened this issue Feb 21, 2019 · 2 comments

Comments

@fangpengzhan
Copy link

您好,最近我在研究您的这个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
Copy link
Author

fangpengzhan commented Feb 21, 2019

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

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

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

@Walleclipse
Copy link
Owner

好的 谢谢!
我也学到了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants