From 74d5e40dea6aabe71317d24de7a03f9e85ba791f Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Sat, 30 May 2020 12:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=AF=B9tf2.0=E7=9A=84=E5=85=BC=E5=AE=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SpeechModel251.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SpeechModel251.py b/SpeechModel251.py index 2595b77..f967cae 100644 --- a/SpeechModel251.py +++ b/SpeechModel251.py @@ -323,8 +323,8 @@ class ModelSpeech(): # 语音模型类 r = K.ctc_decode(base_pred, in_len, greedy = True, beam_width=100, top_paths=1) #print('r', r) - r1 = r[0][0].eval(session=tf.Session()) - tf.reset_default_graph() + r1 = r[0][0].eval(session=tf.compat.v1.Session()) + tf.compat.v1.reset_default_graph() return r1[0] def RecognizeSpeech(self, wavsignal, fs):