README.md 953 字节
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# Embed Paddle Inference in Your Application

Paddle inference offers the APIs in `C` and `C++` languages.

One can easily deploy a model trained by Paddle following the steps as below:

1. Optimize the native model;
2. Write some codes for deployment.


Let's explain the steps in detail.

## Optimize the native Fluid Model

The native model that get from the training phase needs to be optimized for that.

- Clean the noise such as the cost operators that do not need inference;
- Prune unnecessary computation fork that has nothing to do with the output;
- Remove extraneous variables;
- Memory reuse for native Fluid executor;
- Translate the model storage format to some third-party engine's, so that the inference API can utilize the engine for acceleration;

We have an official tool to do the optimization, call `paddle_inference_optimize --help` for more information.

## Write some codes

Read `paddle_inference_api.h` for more information.