From 8e740e9897834c77e2475790741b330c18e518dc Mon Sep 17 00:00:00 2001
From: season <season4675@gmail.com>
Date: 星期日, 02 七月 2023 19:38:48 +0800
Subject: [PATCH] [funasr-runtime-deploy 0.0.4] streamline the process, and add command line parameters. (#697)
---
funasr/export/models/modules/multihead_att.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/funasr/export/models/modules/multihead_att.py b/funasr/export/models/modules/multihead_att.py
index 1983db8..6fce851 100644
--- a/funasr/export/models/modules/multihead_att.py
+++ b/funasr/export/models/modules/multihead_att.py
@@ -75,8 +75,8 @@
return x, cache
-torch_version = float(".".join(torch.__version__.split(".")[:2]))
-if torch_version >= 1.8:
+torch_version = tuple([int(i) for i in torch.__version__.split(".")[:2]])
+if torch_version >= (1, 8):
import torch.fx
torch.fx.wrap('preprocess_for_attn')
--
Gitblit v1.9.1