提交 be9977d7 编写于 作者: Y yangyaming

Add content for Poject Structure and Usage section.

上级 f754a86d
...@@ -6,10 +6,32 @@ ...@@ -6,10 +6,32 @@
(@kuke) (@kuke)
### Project structure ### Project structure
(@pkuyym)
<p align="center">
<img src="./images/project_structure.png"/>
</p>
The project contains four important modules:
* **fluid**: Contain wrappers for fluid related APIs. Fluid has provided some low-level APIs to parse or generate the inference model. However, directly using these low-level APIs makes the code tediously long. This module wraps low-level APIs to provide simplied interfaces.
* **onnx**: ONNX uses proto file to save computation flow and model weights. This module is responsible for parsing and generating ONNX binary model.
* **onnx_fluid**: Concepts in fluid like program, block etc. haven't direct corresponding concepts in ONNX. Even that both contains operator concept, for many operators adaption is also necessary. This module is the most important module responsible for acutal converting. Adaption for different level concepts should be provided like fluid program/block to ONNX graph, fluid operators to ONNX operators etc.
* **convert.py**: Simple top user interface.
### Usage ### Usage
(@pkuyym The converter is very easy to use. Bi-directional conversion between fluid inference model and ONNX binary model is supported. Model validation is also provided to verify the correctness of converted model.
* fluid inference model to ONNX binary model
`python convert.py --direct fluid2ONNX --whether_do_validation True`
* ONNX binary model to fluid inference model
`python convert.py --direct ONNX2fluid --whether_do_validation True`
### Supported models ### Supported models
(@kuke) (@kuke)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册