From 8238de054e63ec6a9476019ba4d736c572117839 Mon Sep 17 00:00:00 2001 From: intellinjun <105184542+intellinjun@users.noreply.github.com> Date: Thu, 28 Jul 2022 15:39:22 +0800 Subject: [PATCH] fix the path error (#166) --- examples/deployment/neural_engine/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/deployment/neural_engine/common.py b/examples/deployment/neural_engine/common.py index b96517c61a3..364663c994e 100644 --- a/examples/deployment/neural_engine/common.py +++ b/examples/deployment/neural_engine/common.py @@ -86,8 +86,11 @@ def compute_performance(dataset, graph, log, log_file, warm_up, batch_size, seq_ all_latency = log_file.replace('.log', '.npy') _,file_name = os.path.split(all_latency) _ = os.getcwd() + '/all_latency' - if os.path.exists(_) == False : - os.mkdir(_) + try: + if os.path.exists(_) == False : + os.mkdir(_) + except: + pass all_latency = os.path.join(_,file_name) All_latency = np.array(duration_w) np.save(all_latency,All_latency,allow_pickle=True, fix_imports=True)