Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine python inference api #26958

Merged
merged 11 commits into from
Sep 7, 2020
Merged

Conversation

jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Sep 3, 2020

PR types

New features

PR changes

APIS

Describe

Add 2.0 inference python API according to 2.0 C++ inference API #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])

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 3, 2020

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@Superjomn Superjomn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiweibo jiweibo merged commit 6321254 into PaddlePaddle:develop Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants