提交 8686f560 编写于 作者: H HexToString

default use cpu

上级 796264df
......@@ -99,7 +99,7 @@ def serve_args():
parser.add_argument(
"--port", type=int, default=9292, help="Port of the starting gpu")
parser.add_argument(
"--device", type=str, default="gpu", help="Type of device")
"--device", type=str, default="cpu", help="Type of device")
parser.add_argument(
"--gpu_ids", type=str, default="", nargs="+", help="gpu ids")
parser.add_argument(
......@@ -179,9 +179,9 @@ def serve_args():
def start_gpu_card_model(gpu_mode, port, args): # pylint: disable=doc-string-missing
device = "gpu"
if gpu_mode == False:
device = "cpu"
device = "cpu"
if gpu_mode == True:
device = "gpu"
thread_num = args.thread
model = args.model
......
......@@ -134,7 +134,7 @@ class WebService(object):
op_num=None,
op_max_batch=None):
device = "gpu"
device = "cpu"
server = Server()
# only when `gpus == None`, which means it`s not set at all
# we will use the self.gpus.
......@@ -149,6 +149,8 @@ class WebService(object):
device = "arm"
else:
device = "cpu"
else:
device = "gpu"
op_maker = OpMaker()
op_seq_maker = OpSeqMaker()
......@@ -227,7 +229,7 @@ class WebService(object):
def prepare_server(self,
workdir,
port=9393,
device="gpu",
device="cpu",
precision="fp32",
use_calib=False,
use_lite=False,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册