Created by: jiweibo
PR types
New features
PR changes
APIS
Describe
Add 2.0 inference python API according to 2.0 C++ inference API https://github.com/PaddlePaddle/Paddle/pull/26774
from paddle.fluid.inference import Config, create_predictor, get_version, PredictorPool
# init config
...
# init predictor
predictor = create_predictor(config)
# get input handle
input_names = predictor.get_input_names()
input_handle = predictor.get_input_handle(input_names[0])
# set input data
...
# run
predictor.run()
# get output handle
output_names = predictor.get_output_names()
output_hanlde = predictor.get_output_handle(output_names[0])