fix infer

pull/2429/head
littletomatodonkey 2021-04-09 10:28:06 +00:00
parent 86f4abf7d5
commit e19bedf523
2 changed files with 4 additions and 3 deletions

View File

@ -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))

View File

@ -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)