fix infer
parent
86f4abf7d5
commit
e19bedf523
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue