提交 8cc3cebe 编写于 作者: H HexToString

add doc 2 by ysl

上级 7dd623f2
......@@ -122,6 +122,3 @@ python3 ocr_cpp_client.py ocr_det_client ocr_rec_client
#ocr_rec_client为第二个模型的Client端proto文件夹相对路径
```
此时,对于Server端而言,`'general_reader'`会检查输入的数据的格式是否与第一个模型的Client端proto格式定义的一致,`'general_response'`会保证输出的数据格式与第二个模型的Client端proto文件一致。
......@@ -16,12 +16,14 @@
### 简单的串联结构
PaddleServing在框架中具有一些预定义的计算节点。 一种非常常用的计算图是简单的reader-infer-response模式,可以涵盖大多数单一模型推理方案。 示例图和通过`Python API 启动Server`相应的DAG定义代码如下(`python/paddle_serving_server/serve.py`
PaddleServing在框架中具有一些预定义的计算节点。 一种非常常用的计算图是简单的reader-infer-response模式,可以涵盖大多数单一模型推理方案。 示例图如下所示
<center>
<img src='../images/simple_dag.png' width = "260" height = "370" align="middle"/>
</center>
通过`Python API 启动Server`相应的DAG定义代码如下(`python/paddle_serving_server/serve.py`)。
``` python
import paddle_serving_server as serving
from paddle_serving_server import OpMaker
......@@ -38,7 +40,7 @@ op_seq_maker.add_op(general_infer_op)
op_seq_maker.add_op(general_response_op)
```
如果使用`C++命令行 + 配置文件的方式启动Server`只需修改配置文件即可
如果使用`命令行 + 配置文件的方式启动C++Server`只需[修改配置文件]((./Serving_Configure_CN.md))即可,无须修改👆的代码
对于简单的串联逻辑,我们将其简化为`Sequence`,使用`OpSeqMaker`进行构建。用户可以不指定每个节点的前继,默认按加入`OpSeqMaker`的顺序来确定前继。
......
......@@ -16,12 +16,13 @@ Deep neural nets often have some preprocessing steps on input data, and postproc
### Simple series structure
PaddleServing has some predefined Computation Node in the framework. A very commonly used Computation Graph is the simple reader-inference-response mode that can cover most of the single model inference scenarios. A example graph and the corresponding DAG definition code is as follows.
PaddleServing has some predefined Computation Node in the framework. A very commonly used Computation Graph is the simple reader-inference-response mode that can cover most of the single model inference scenarios. Here is a example of DAG graph.
<center>
<img src='../images/simple_dag.png' width = "260" height = "370" align="middle"/>
</center>
If you want to start the server through the python API. The corresponding DAG definition code is as follows.
``` python
import paddle_serving_server as serving
from paddle_serving_server import OpMaker
......@@ -38,6 +39,8 @@ op_seq_maker.add_op(general_infer_op)
op_seq_maker.add_op(general_response_op)
```
If you use `the command line + configuration file method to start C++ server`, you only need to modify [the configuration file](./Serving_Configure_CN.md), don`t need to change any line of 👆 code.
For simple series logic, we simplify it and build it with `OpSeqMaker`. You can determine the successor by default according to the order of joining `OpSeqMaker` without specifying the successor of each node.
Since the code will be commonly used and users do not have to change the code, PaddleServing releases a easy-to-use launching command for service startup. An example is as follows:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册