未验证 提交 b1a8fa72 编写于 作者: Y Yibing Liu 提交者: GitHub

Some fixes of pantheon api doc (#81)

上级 ae7ff429
...@@ -65,7 +65,7 @@ pantheon.Teacher.start\_knowledge\_service(feed\_list, schema, program, reader\_ ...@@ -65,7 +65,7 @@ pantheon.Teacher.start\_knowledge\_service(feed\_list, schema, program, reader\_
- **feed\_list (list):** - A list of feed Variables or their names for the - **feed\_list (list):** - A list of feed Variables or their names for the
input teacher Program. input teacher Program.
- **schema (dict):** - A dictionary to specify keys and fetched Variables - **schema (dict):** - A dict to specify keys and fetched Variables
to generate knowledge. to generate knowledge.
- **program (fluid.Program):** - Inference Program of the teacher model. - **program (fluid.Program):** - Inference Program of the teacher model.
- **reader\_config (dict):** - The config for data reader. Support all the three types of generators used by [fluid.io.PyReader](https://www.paddlepaddle.org.cn/documentation/docs/en/api/io/PyReader.html) and [fluid.io.DataLoader](https://www.paddlepaddle.org.cn/documentation/docs/en/api/io/DataLoader.html#dataloader), and their configs contain the key-value pair of the generator type and a generator object, plus other necessary argument pairs. See the following: - **reader\_config (dict):** - The config for data reader. Support all the three types of generators used by [fluid.io.PyReader](https://www.paddlepaddle.org.cn/documentation/docs/en/api/io/PyReader.html) and [fluid.io.DataLoader](https://www.paddlepaddle.org.cn/documentation/docs/en/api/io/DataLoader.html#dataloader), and their configs contain the key-value pair of the generator type and a generator object, plus other necessary argument pairs. See the following:
...@@ -96,7 +96,7 @@ pantheon.Teacher.start\_knowledge\_service(feed\_list, schema, program, reader\_ ...@@ -96,7 +96,7 @@ pantheon.Teacher.start\_knowledge\_service(feed\_list, schema, program, reader\_
- **buf\_size (int):** The size of buffers for data reader and knowledge - **buf\_size (int):** The size of buffers for data reader and knowledge
writer on each device. writer on each device.
- **times (int):** The maximum repeated serving times, default 1. Whenever - **times (int):** The maximum repeated serving times, default 1. Whenever
the public method **get\_knowledge\_generator()** in Student the public method **get\_knowledge\_generator()** in **Student**
object called once, the serving times will be added one, object called once, the serving times will be added one,
until reaching the maximum and ending the service. until reaching the maximum and ending the service.
...@@ -152,7 +152,7 @@ pantheon.Student(merge_strategy=None) [source](https://github.com/PaddlePaddle/P ...@@ -152,7 +152,7 @@ pantheon.Student(merge_strategy=None) [source](https://github.com/PaddlePaddle/P
**Args:** **Args:**
- **merge\_strategy (dict|None):** - A dictionary whose keys are the common schemas shared by different teachers, and each corresponding value specifies the merging strategy for different schemas respectively, supporting **sum** and **mean** now. - **merge\_strategy (dict|None):** - A dict whose keys are the common schemas shared by different teachers, and each corresponding value specifies the merging strategy for different schemas respectively, supporting **sum** and **mean** now.
**Return:** An object of class Student. **Return:** An object of class Student.
...@@ -164,7 +164,7 @@ pantheon.Student.register\_teacher(in\_path=None, in\_address=None) [source](htt ...@@ -164,7 +164,7 @@ pantheon.Student.register\_teacher(in\_path=None, in\_address=None) [source](htt
**Args:** **Args:**
- **in\_path (str|None):** The input file path. Default None. - **in\_path (str|None):** The input file path. Default None.
- **in\_address (str|None):** The input IP address, in the format "\<IP address\>:\<IP port\>" (e.g. "127.0.0.1:8080"). Default None. - **in\_address (str|None):** The input IP address, in the format "&lt;IP\_address&gt;:&lt;IP\_port&gt;" (e.g. "127.0.0.1:8080"). Default None.
**Return:** None **Return:** None
...@@ -240,8 +240,6 @@ pantheon.Student.get\_knowledge\_generator(batch\_size, drop\_last=False) [sourc ...@@ -240,8 +240,6 @@ pantheon.Student.get\_knowledge\_generator(batch\_size, drop\_last=False) [sourc
**Examples:** **Examples:**
Note: this example should be run with the example of class **Teacher**.
```python ```python
from paddleslim.pantheon import Student from paddleslim.pantheon import Student
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册