From cc5f5dfba9a887ec76648a6381b500c5c6c66024 Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Tue, 16 Nov 2021 22:33:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=80=A7=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E6=8E=89save()=20=E5=B9=B6=E5=8A=A0=E4=B8=8A=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E7=9A=84.h5=E6=96=87=E4=BB=B6=E5=90=8E=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- speech_model_zoo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech_model_zoo.py b/speech_model_zoo.py index 52fdcdf..26c989a 100644 --- a/speech_model_zoo.py +++ b/speech_model_zoo.py @@ -167,11 +167,11 @@ class SpeechModel251(BaseModel): self.model.load_weights(filename) def save_weights(self, filename :str) -> None: - self.model.save_weights(filename + '.model') - self.model_base.save_weights(filename + '.model.base') + self.model.save_weights(filename + '.model.h5') + self.model_base.save_weights(filename + '.model.base.h5') # 需要安装 hdf5 模块 - self.model.save(filename + '.h5') - self.model_base.save(filename + '.base.h5') + #self.model.save(filename + '.h5') + #self.model_base.save(filename + '.base.h5') f = open('epoch_'+self._model_name+'.txt','w') f.write(filename) f.close()