From b0f4910de6dc91c13828026fb5bdd4f15d8636f3 Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期二, 27 六月 2023 20:11:30 +0800
Subject: [PATCH] update

---
 funasr/tasks/abs_task.py |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/funasr/tasks/abs_task.py b/funasr/tasks/abs_task.py
index 0b7a306..0fb77a9 100644
--- a/funasr/tasks/abs_task.py
+++ b/funasr/tasks/abs_task.py
@@ -1252,13 +1252,9 @@
             raise RuntimeError(
                 f"model must inherit {FunASRModel.__name__}, but got {type(model)}"
             )
-        #model = model.to(
-        #    dtype=getattr(torch, args.train_dtype),
-        #    device="cuda" if args.ngpu > 0 else "cpu",
-        #)
         model = model.to(
             dtype=getattr(torch, args.train_dtype),
-            device="cpu",
+            device="cuda" if args.ngpu > 0 else "cpu",
         )
         for t in args.freeze_param:
             for k, p in model.named_parameters():

--
Gitblit v1.9.1