From 8fb6fea192ead1c76151ec33f5b707ad3416d40d Mon Sep 17 00:00:00 2001 From: Double_V Date: Mon, 19 Sep 2022 17:35:04 +0800 Subject: [PATCH] Update utility.py --- tools/infer/utility.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index a8c59fac..dafbfbea 100644 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -227,10 +227,7 @@ def create_predictor(args, mode, logger): use_calib_mode=False) # collect shape - model_name = os.path.basename( - model_dir[:-1]) if model_dir.endswith( - "/") else os.path.basename(model_dir) - trt_shape_f = f"{mode}_{model_name}.txt" + trt_shape_f = os.path.join(model_dir, f"{mode}_trt_dynamic_shape.txt") if not os.path.exists(trt_shape_f): config.collect_shape_range_info(trt_shape_f) -- GitLab