提交 e19bedf5 编写于 作者: littletomatodonkey's avatar littletomatodonkey

fix infer

上级 86f4abf7
......@@ -38,9 +38,11 @@ if __name__ == "__main__":
with open("{}/results.{}".format(inference_dir, process_id),
"w") as fin:
p = subprocess.Popen(cmd, stdout=fin, stderr=fin)
# p = subprocess.Popen(cmd, stdout=fin, stderr=fin)
# if you want to print results in the screen, you can use the following command
# p = subprocess.Popen(cmd, stdout=fin, stderr=sys.stdout)
p = subprocess.Popen(cmd, stdout=sys.stdout, stderr=sys.stdout)
p_list.append(p)
for p in p_list:
p.wait()
print("all inference results are save in directory: {}".format(
inference_dir))
......@@ -85,7 +85,6 @@ def parse_args():
parser.add_argument("--enable_mkldnn", type=str2bool, default=False)
parser.add_argument("--use_pdserving", type=str2bool, default=False)
parser.add_argument("--use_multiprocess", type=str2bool, default=False)
parser.add_argument("--total_process_num", type=int, default=1)
parser.add_argument("--process_id", type=int, default=0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册