From 68808cb5f6db3a761ad6286683e0ea3b9edddc19 Mon Sep 17 00:00:00 2001
From: haoneng.lhn <haoneng.lhn@alibaba-inc.com>
Date: 星期三, 11 十月 2023 16:16:46 +0800
Subject: [PATCH] update github io

---
 funasr/train/trainer.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/funasr/train/trainer.py b/funasr/train/trainer.py
index a25f39a..27d6f9c 100644
--- a/funasr/train/trainer.py
+++ b/funasr/train/trainer.py
@@ -369,7 +369,7 @@
                             ],
                             "scaler": scaler.state_dict() if scaler is not None else None,
                             "ema_model": model.encoder.ema.model.state_dict()
-                            if hasattr(model.encoder, "ema") and model.encoder.ema is not None else None,
+                            if hasattr(model, "encoder") and hasattr(model.encoder, "ema") and model.encoder.ema is not None else None,
                         },
                         buffer,
                     )

--
Gitblit v1.9.1