diff --git a/tools/infer/predict.py b/tools/infer/predict.py index 849d4064327d005c9593203fdfe956849bf2b949..3cdff940109cf14755182373d77ee81e4df4066f 100644 --- a/tools/infer/predict.py +++ b/tools/infer/predict.py @@ -39,8 +39,8 @@ def create_paddle_predictor(args): config.switch_ir_optim(args.ir_optim) # default true if args.use_tensorrt: config.enable_tensorrt_engine( - precision_mode=Config.PrecisionType.Half - if args.use_fp16 else Config.PrecisionType.Float32, + precision_mode=Config.Precision.Half + if args.use_fp16 else Config.Precision.Float32, max_batch_size=args.batch_size) config.enable_memory_optim()