From 6ca0d1f54c8b698e3315edab8aa9ba7227d7c9e7 Mon Sep 17 00:00:00 2001
From: wanchen.swc <wanchen.swc@alibaba-inc.com>
Date: 星期四, 16 三月 2023 18:53:57 +0800
Subject: [PATCH] [Quantization] run calib without grad
---
funasr/export/export_model.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/funasr/export/export_model.py b/funasr/export/export_model.py
index b827f16..e57a397 100644
--- a/funasr/export/export_model.py
+++ b/funasr/export/export_model.py
@@ -74,8 +74,10 @@
# using dummy inputs for a example
if self.audio_in is not None:
feats, feats_len = self.load_feats(self.audio_in)
- for feat, len in zip(feats, feats_len):
- m(feat, len)
+ for i, (feat, len) in enumerate(zip(feats, feats_len)):
+ print("debug, iter: {}".format(i))
+ with torch.no_grad():
+ m(feat, len)
else:
dummy_input = model.get_dummy_inputs()
m(*dummy_input)
--
Gitblit v1.9.1