From 8482141d20f86bba11d0031a5d2081497dd2f940 Mon Sep 17 00:00:00 2001
From: yhliang <68215459+yhliang-aslp@users.noreply.github.com>
Date: 星期三, 27 九月 2023 10:17:49 +0800
Subject: [PATCH] Update Dataset.md
---
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