未验证 提交 13961868 编写于 作者: X xiaoting 提交者: GitHub

Merge pull request #4845 from andyjpaddle/fix_trt_dynamic_shape

fix rec trt dynamic shape error
...@@ -271,8 +271,13 @@ def create_predictor(args, mode, logger): ...@@ -271,8 +271,13 @@ def create_predictor(args, mode, logger):
min_input_shape = {"x": [1, 3, 10, 10]} min_input_shape = {"x": [1, 3, 10, 10]}
max_input_shape = {"x": [1, 3, 512, 512]} max_input_shape = {"x": [1, 3, 512, 512]}
opt_input_shape = {"x": [1, 3, 256, 256]} opt_input_shape = {"x": [1, 3, 256, 256]}
config.set_trt_dynamic_shape_info(min_input_shape, max_input_shape, if mode == "rec":
opt_input_shape) if args.rec_algorithm == "CRNN":
config.set_trt_dynamic_shape_info(
min_input_shape, max_input_shape, opt_input_shape)
else:
config.set_trt_dynamic_shape_info(
min_input_shape, max_input_shape, opt_input_shape)
else: else:
config.disable_gpu() config.disable_gpu()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册