Skip to content

運行的過程中出現這個問題 #17

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

Closed
Sean861026 opened this issue Jun 4, 2018 · 2 comments
Closed

運行的過程中出現這個問題 #17

Sean861026 opened this issue Jun 4, 2018 · 2 comments

Comments

@Sean861026
Copy link

Sean861026 commented Jun 4, 2018

Traceback (most recent call last):
File "asrserver.py", line 16, in
ms = ModelSpeech(datapath)
File "C:\ASRT_SpeechRecognition-master\SpeechModel24.py", line 39, in init
self._model, self.base_model = self.CreateModel()
File "C:\ASRT_SpeechRecognition-master\SpeechModel24.py", line 126, in CreateModel
test_func = K.function([input_data], [y_pred])
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\keras-2.1.6-py3.6.egg\keras\backend\theano_backend.py", line 1248, in function
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\keras-2.1.6-py3.6.egg\keras\backend\theano_backend.py", line 1234, in init
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function.py", line 317, in function
output_keys=output_keys)
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\pfunc.py", line 486, in pfunc
output_keys=output_keys)
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function_module.py", line 1839, in orig_function
name=name)
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function_module.py", line 1487, in init
accept_inplace)
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function_module.py", line 181, in std_fgraph
update_mapping=update_mapping)
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\gof\fg.py", line 175, in init
self.import_r(output, reason="init")
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\gof\fg.py", line 346, in import_r
self.import(variable.owner, reason=reason)
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\gof\fg.py", line 391, in import
raise MissingInputError(error_msg, variable=r)
theano.gof.fg.MissingInputError: Input 0 of the graph (indices start from 0), used to compute if{}(keras_learning_phase, Elemwise{true_div,no_inplace}.0, Elemwise{mul,no_inplace}.0), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.

Backtrace when that variable is created:

File "", line 656, in _load_unlocked
File "", line 626, in load_backward_compatible
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\keras-2.1.6-py3.6.egg\keras\backend_init
.py", line 81, in
from .theano_backend import *
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 656, in _load_unlocked
File "", line 626, in _load_backward_compatible
File "C:\Users\bub20\AppData\Local\Programs\Python\Python36\lib\site-packages\keras-2.1.6-py3.6.egg\keras\backend\theano_backend.py", line 34, in
_LEARNING_PHASE = T.scalar(dtype='uint8', name='keras_learning_phase') # 0 = test, 1 = train

@nl8590687
Copy link
Owner

您好,從這個報錯問題的輸出內容來看,應該是您使用的Keras的後端的問題,本項目需要使用TensorFlow作為Keras的後端backend,而不是Theano,請安裝TensorFlow并將Keras切換到TF後端程式即可正常運行。

@Sean861026
Copy link
Author

謝謝 已解決

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