From a78b7602185bf370bf2619b91e6a39afeb1d36e3 Mon Sep 17 00:00:00 2001 From: ranqiu Date: Wed, 14 Mar 2018 10:44:21 +0800 Subject: [PATCH] Refine api_doc_std_cn --- doc/fluid/dev/api_doc_std_cn.md | 8 ++++---- doc/fluid/dev/src/fc.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/fluid/dev/api_doc_std_cn.md b/doc/fluid/dev/api_doc_std_cn.md index 1d57550f64..9e9e77177f 100644 --- a/doc/fluid/dev/api_doc_std_cn.md +++ b/doc/fluid/dev/api_doc_std_cn.md @@ -40,7 +40,7 @@ API文档须包含以下几个模块(排列顺序为文档撰写顺序): ## 格式及示例 -API文档各模块格式及示例如下(以下以fc为例进行说明): +API文档须使用rst格式撰写,该格式详情请参考[链接](http://sphinx-doc-zh.readthedocs.io/en/latest/rest.html)。API文档各模块的内容格式及示例如下(以下以fc为例进行说明): - Python API Definition @@ -137,7 +137,7 @@ API文档各模块格式及示例如下(以下以fc为例进行说明): ``` Args: - input (Tensor): The input tensor(s) of the layer. + input (Variable|list of Variable): This layer's input tensor(s) which is at least 2-dimensional. param_attr (ParamAttr|list of ParamAttr, default None): The parameter attribute for learnable parameters/weights of this layer. name (str, default None): The name of this layer. @@ -186,7 +186,7 @@ API文档各模块格式及示例如下(以下以fc为例进行说明): - 示例 - fc没有注意事项,故该模块省略不写。其他情况应明确给出,若有多条注意事项,须分条列出,以scaled\_dot\_product\_attention为例: + fc没有注意事项,故该模块省略不写。如有注意事项应明确给出,当有多条注意事项,须分条列出,以scaled\_dot\_product\_attention为例: ``` Note: @@ -216,4 +216,4 @@ API文档各模块格式及示例如下(以下以fc为例进行说明): ## 完整示例 -fc 的完整注释见[示例](https://github.com/PaddlePaddle/Paddle/tree/develop/doc/fluid/dev/src/fc.py)。 +fc 的完整注释见[示例](src/fc.py)。 diff --git a/doc/fluid/dev/src/fc.py b/doc/fluid/dev/src/fc.py index 40f3c7fd3e..14a3c4cd01 100644 --- a/doc/fluid/dev/src/fc.py +++ b/doc/fluid/dev/src/fc.py @@ -48,8 +48,8 @@ def fc(input, * :math:`Out`: The output tensor. Args: - input (Tensor|list of Tensor): The input tensor(s) to this layer. - size(int): The number of output units in the fully connected layer. + input (Variable|list of Variable): This layer's input tensor(s) which is at least 2-dimensional. + size(int): The number of output units in this layer. num_flatten_dims (int, default 1): The fc layer can accept an input tensor with more than two dimensions. If this happens, the multidimensional tensor will first be flattened into a 2-dimensional matrix. The parameter `num_flatten_dims` determines how the input @@ -62,7 +62,7 @@ def fc(input, param_attr (ParamAttr|list of ParamAttr, default None): The parameter attribute for learnable parameters/weights of this layer. bias_attr (ParamAttr|list of ParamAttr, default None): The parameter attribute for the bias - parameter of this layer. If set None, no bias will be added to the output units. + of this layer. If it is set to None, no bias will be added to the output units. act (str, default None): Activation to be applied to the output of this layer. name (str, default None): The name of this layer. -- GitLab