Merge pull request #75 from CXXT-Projects/add-hdf5-saving

Added methods for saving HDF5 model
This commit is contained in:
nl8590687 2019-01-21 20:39:34 +08:00 committed by GitHub
commit c17b5ef490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -197,8 +197,11 @@ class ModelSpeech(): # 语音模型类
'''
保存模型参数
'''
self._model.save_weights(filename+comment+'.model')
self._model.save_weights(filename + comment + '.model')
self.base_model.save_weights(filename + comment + '.model.base')
# 需要安装 hdf5 模块
self._model.save(filename + comment + '.h5')
self.base_model.save(filename + comment + '.base.h5')
f = open('step'+ModelName+'.txt','w')
f.write(filename+comment)
f.close()