From a3753aae50f890b1bae296d50ca3b3adc5ebb4ba Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Fri, 13 May 2022 14:28:35 +0000 Subject: [PATCH] fix rec prediction for trt7 --- tools/infer/utility.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 74ec42ec..67a03177 100644 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -272,9 +272,10 @@ def create_predictor(args, mode, logger): if args.rec_algorithm not in ["CRNN", "SVTR_LCNet"]: use_dynamic_shape = False imgH = int(args.rec_image_shape.split(',')[-2]) - min_input_shape = {"x": [1, 3, imgH, 10]} - max_input_shape = {"x": [args.rec_batch_num, 3, imgH, 2304]} - opt_input_shape = {"x": [args.rec_batch_num, 3, imgH, 320]} + min_input_shape = {"x": [1, 3, imgH, 10], } + max_input_shape = {"x": [args.rec_batch_num, 3, imgH, 2304], } + opt_input_shape = {"x": [args.rec_batch_num, 3, imgH, 320], } + config.exp_disable_tensorrt_ops(["elementwise_add"]) elif mode == "cls": min_input_shape = {"x": [1, 3, 48, 10]} max_input_shape = {"x": [args.rec_batch_num, 3, 48, 1024]} -- GitLab