From b1a8fa72acfc8bfae9c1f19cb2f1c8600312eab5 Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Wed, 5 Feb 2020 09:54:51 +0800 Subject: [PATCH] Some fixes of pantheon api doc (#81) --- docs/docs/api/pantheon_api.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/docs/api/pantheon_api.md b/docs/docs/api/pantheon_api.md index bdc409f5..e5961124 100644 --- a/docs/docs/api/pantheon_api.md +++ b/docs/docs/api/pantheon_api.md @@ -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: @@ -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. @@ -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. @@ -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 "\:\" (e.g. "127.0.0.1:8080"). 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. **Return:** None @@ -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 -- GitLab