switch model to 251

This commit is contained in:
nl 2018-07-27 14:31:48 +08:00
parent c09853f7a2
commit 201c0189db
3 changed files with 6 additions and 6 deletions

View File

@ -8,13 +8,13 @@
import http.server import http.server
import urllib import urllib
import keras import keras
from SpeechModel25 import ModelSpeech from SpeechModel251 import ModelSpeech
from LanguageModel import ModelLanguage from LanguageModel import ModelLanguage
datapath = 'data/' datapath = 'data/'
modelpath = 'model_speech/' modelpath = 'model_speech/'
ms = ModelSpeech(datapath) ms = ModelSpeech(datapath)
ms.LoadModel(modelpath + 'm25/speech_model25_e_0_step_545500.model') ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_12000.model')
ml = ModelLanguage('model_language') ml = ModelLanguage('model_language')
ml.LoadModel() ml.LoadModel()

View File

@ -12,7 +12,7 @@ import tensorflow as tf
from keras.backend.tensorflow_backend import set_session from keras.backend.tensorflow_backend import set_session
from SpeechModel25 import ModelSpeech from SpeechModel251 import ModelSpeech
os.environ["CUDA_VISIBLE_DEVICES"] = "0" os.environ["CUDA_VISIBLE_DEVICES"] = "0"
@ -44,7 +44,7 @@ else:
ms = ModelSpeech(datapath) ms = ModelSpeech(datapath)
ms.LoadModel(modelpath + 'm25/speech_model25_e_0_step_42500.model') ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_42500.model')
ms.TestModel(datapath, str_dataset='test', data_count = 128, out_report = True) ms.TestModel(datapath, str_dataset='test', data_count = 128, out_report = True)

View File

@ -12,7 +12,7 @@ import tensorflow as tf
from keras.backend.tensorflow_backend import set_session from keras.backend.tensorflow_backend import set_session
from SpeechModel25 import ModelSpeech from SpeechModel251 import ModelSpeech
os.environ["CUDA_VISIBLE_DEVICES"] = "0" os.environ["CUDA_VISIBLE_DEVICES"] = "0"
#进行配置使用95%的GPU #进行配置使用95%的GPU
@ -43,7 +43,7 @@ else:
ms = ModelSpeech(datapath) ms = ModelSpeech(datapath)
#ms.LoadModel(modelpath + 'speech_model24_e_0_step_327500.model') #ms.LoadModel(modelpath + 'speech_model251_e_0_step_327500.model')
ms.TrainModel(datapath, epoch = 50, batch_size = 16, save_step = 500) ms.TrainModel(datapath, epoch = 50, batch_size = 16, save_step = 500)