Skip to content

Commit

Permalink
Some fixes of pantheon api doc (PaddlePaddle#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yibing Liu authored Feb 5, 2020
1 parent ae7ff42 commit b1a8fa7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/docs/api/pantheon_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.
- **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:
Expand Down Expand Up @@ -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
writer on each device.
- **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,
until reaching the maximum and ending the service.
Expand Down Expand Up @@ -152,7 +152,7 @@ pantheon.Student(merge_strategy=None) [source](https://github.com/PaddlePaddle/P

**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.

Expand All @@ -164,7 +164,7 @@ pantheon.Student.register\_teacher(in\_path=None, in\_address=None) [source](htt
**Args:**

- **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

Expand Down Expand Up @@ -240,8 +240,6 @@ pantheon.Student.get\_knowledge\_generator(batch\_size, drop\_last=False) [sourc

**Examples:**

Note: this example should be run with the example of class **Teacher**.

```python
from paddleslim.pantheon import Student

Expand Down

0 comments on commit b1a8fa7

Please sign in to comment.