未验证 提交 8fb6fea1 编写于 作者: D Double_V 提交者: GitHub

Update utility.py

上级 bb54e9b8
...@@ -227,10 +227,7 @@ def create_predictor(args, mode, logger): ...@@ -227,10 +227,7 @@ def create_predictor(args, mode, logger):
use_calib_mode=False) use_calib_mode=False)
# collect shape # collect shape
model_name = os.path.basename( trt_shape_f = os.path.join(model_dir, f"{mode}_trt_dynamic_shape.txt")
model_dir[:-1]) if model_dir.endswith(
"/") else os.path.basename(model_dir)
trt_shape_f = f"{mode}_{model_name}.txt"
if not os.path.exists(trt_shape_f): if not os.path.exists(trt_shape_f):
config.collect_shape_range_info(trt_shape_f) config.collect_shape_range_info(trt_shape_f)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册