未验证 提交 c01d5fc2 编写于 作者: A andyjpaddle 提交者: GitHub

update trt dynamic shape for v3 rec (#6066)

* update trt dynamic shape for v3 rec

* update trt dynamic shape for v3 rec
上级 4dba9763
...@@ -271,9 +271,10 @@ def create_predictor(args, mode, logger): ...@@ -271,9 +271,10 @@ def create_predictor(args, mode, logger):
elif mode == "rec": elif mode == "rec":
if args.rec_algorithm != "CRNN": if args.rec_algorithm != "CRNN":
use_dynamic_shape = False use_dynamic_shape = False
min_input_shape = {"x": [1, 3, 32, 10]} imgH = int(args.rec_image_shape.split(',')[-2])
max_input_shape = {"x": [args.rec_batch_num, 3, 32, 1536]} min_input_shape = {"x": [1, 3, imgH, 10]}
opt_input_shape = {"x": [args.rec_batch_num, 3, 32, 320]} max_input_shape = {"x": [args.rec_batch_num, 3, imgH, 1536]}
opt_input_shape = {"x": [args.rec_batch_num, 3, imgH, 320]}
elif mode == "cls": elif mode == "cls":
min_input_shape = {"x": [1, 3, 48, 10]} min_input_shape = {"x": [1, 3, 48, 10]}
max_input_shape = {"x": [args.rec_batch_num, 3, 48, 1024]} max_input_shape = {"x": [args.rec_batch_num, 3, 48, 1024]}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册