From fd0c0acd509204df760637e3886593c0413cb8a1 Mon Sep 17 00:00:00 2001
From: wanchen.swc <wanchen.swc@alibaba-inc.com>
Date: 星期五, 17 三月 2023 11:13:03 +0800
Subject: [PATCH] [Quantization] update README.md: pip install torch-quant

---
 funasr/export/export_model.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/funasr/export/export_model.py b/funasr/export/export_model.py
index b827f16..9a1ef96 100644
--- a/funasr/export/export_model.py
+++ b/funasr/export/export_model.py
@@ -74,8 +74,9 @@
             # 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)):
+                    with torch.no_grad():
+                        m(feat, len)
             else:
                 dummy_input = model.get_dummy_inputs()
                 m(*dummy_input)

--
Gitblit v1.9.1