Skip to content

[Cherry-pick] Add optional for param attr args #3280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
da60b88
[cherrypick]Fix docs of summary, crop, to_tensor and FashionMnist (#3…
LielinJiang Jan 18, 2021
ebfeb47
add xpu_docs (#3141)
TCChenlong Jan 19, 2021
0ab9bfd
2.0 API: device_guard (#3150)
zhangting2020 Jan 21, 2021
a1810c0
update the code for the dot calcluate (#3155)
wawltor Jan 22, 2021
9e0fd18
[Cherry-pick] Add Variable `clone` Method (#3151)
zhhsplendid Jan 22, 2021
3673ed5
Add nn overview (#3153) (#3156)
TCChenlong Jan 25, 2021
30f6c29
Update install doc for 2.0 (#3161)
pangyoki Jan 25, 2021
bb02c59
[cherry-pick] update 2.0 docs & apis (#3167)
TCChenlong Jan 25, 2021
eee419b
merge pr3162 (#3164) (#3172)
jiweibo Jan 26, 2021
601d010
Add cn_doc for sinh. (#3173) (#3176)
xiemoyuan Jan 26, 2021
a2fe0d0
fix overview (#3181) (#3182)
TCChenlong Jan 26, 2021
68b685f
Cherry pick 3169, Update view apis (squeeze, unsqueeze, reshape, flat…
pangyoki Jan 26, 2021
44d7934
Cherry pick 3171, Add 8 Inplace apis cn doc (#3171) (#3185)
pangyoki Jan 26, 2021
0cd0e0b
[cherry-pick #3183 #3187 #3189] updata to 2.0 (#3191)
TCChenlong Jan 28, 2021
3f5d308
【cherry-pick】2.0 xpu update (#3194)
TCChenlong Jan 28, 2021
763ddf1
update links (#3195)
TCChenlong Jan 28, 2021
91f0627
Fix xpu links (#3196) (#3197)
TCChenlong Jan 28, 2021
f844e61
add docs to 2.0 (#3200)
TCChenlong Jan 29, 2021
a899bb2
update image ocr (#3203)
TCChenlong Jan 29, 2021
fcc21ab
update gather_tree doc (#3174) (#3204)
FrostML Jan 31, 2021
57382f8
[cherry-pick #3206 ]2.0 en release note (#3207)
TCChenlong Jan 31, 2021
c9f0b55
Add paddle.static.auc and acc cn doc, and add overview for metric (#3…
LiuChiachi Feb 2, 2021
f22e755
add quiet option to wget cmd (#3213) (#3215)
MingMingShangTian Feb 2, 2021
fa28cd1
0202 bug fix (#3216) (#3217)
TCChenlong Feb 2, 2021
df77cf3
update 2.0 lib link (#3220) (#3223)
jiweibo Feb 3, 2021
69cd6d2
Fix xpu links bugs (#3219) (#3224)
TCChenlong Feb 3, 2021
55870bf
test=release/2.0 (#3221)
swtkiwi Feb 3, 2021
2ac0869
add xpu api Chinese documents (#3208) (#3218)
vslyu Feb 3, 2021
9ab0fb5
Add Overview for paddle.jit (#3214) (#3226)
zhhsplendid Feb 4, 2021
cacc97d
fix links bugs (#3225)
TCChenlong Feb 4, 2021
de456aa
cherry-pick 3229 (#3230)
pangyoki Feb 4, 2021
ccc7062
add docs of get_image_backend, set_image_backend, image_load (#3188) …
LielinJiang Feb 4, 2021
3092132
Cherry-pick PR 3231, add inference package in Tables (#3231) (#3232)
pangyoki Feb 5, 2021
4e0a1f2
Cherry-pick 3233, add cn doc for broadcast_shape api (#3233) (#3235)
pangyoki Feb 5, 2021
19a520c
cherry-pick trt fqa (#3238)
jiweibo Feb 8, 2021
7c212d8
Refine ProgramTranslator doc (#3239) (#3240)
zhhsplendid Feb 8, 2021
94faf2d
cherry-pick paddle inference api enable_profile() FAQ (#3241) (#3242)
haozech Feb 8, 2021
f47a0a4
add save load faq (#3243) (#3244)
chenwhql Feb 9, 2021
1be8756
Fix typo bugs 0209 (#3245) (#3246)
TCChenlong Feb 10, 2021
28298e4
upgrade variable cn api to 2.0, test=develop, test=document_fix (#317…
juncaipeng Feb 19, 2021
674982f
update infer lib to 2.0.0 (#3248) (#3254)
Feb 19, 2021
d05cbde
Add chinese document of Lamb (#3205) (#3259)
gfwm2013 Feb 19, 2021
c66cde1
[WIP] add chinese doc for subset dataset api and random split api (#3…
Joejiong Feb 20, 2021
a86ed29
Add paddle overview (#3247) (#3263)
TCChenlong Feb 20, 2021
231ef8a
Cherry-pick PR 3236, add Overview for distribution and amp (#3236) (#…
pangyoki Feb 20, 2021
2cde8d8
fix typo and add description (#3257) (#3265)
joey12300 Feb 20, 2021
553675b
[cherry pick] dataloader doc (#3269)
heavengate Feb 20, 2021
b3de165
fix param attr detail error (#3278)
chenwhql Feb 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ci_scripts/api_white_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ paddle/distributed/fleet/utils/fs/HDFSClient_cn.rst
paddle/distributed/fleet/utils/fs/LocalFS_cn.rst
paddle/fluid/dygraph/parallel/DataParallel_cn.rst
paddle/fluid/dygraph/parallel/ParallelEnv_cn.rst
paddle/fluid/framework/is_compiled_with_xpu_cn.rst
paddle/fluid/framework/xpu_places_cn.rst
paddle/fluid/core/XPUPlace_cn.rst
upgrade_guide_cn.md
2 changes: 1 addition & 1 deletion ci_scripts/check_api_cn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -x
function install_paddle() {
# try to download paddle, and install
rm -rf paddlepaddle_gpu-0.0.0-cp27-cp27mu-linux_x86_64.whl
wget https://paddle-fluiddoc-ci.bj.bcebos.com/python/dist/paddlepaddle_gpu-0.0.0-cp27-cp27mu-linux_x86_64.whl
wget -q https://paddle-fluiddoc-ci.bj.bcebos.com/python/dist/paddlepaddle_gpu-0.0.0-cp27-cp27mu-linux_x86_64.whl
pip install -U paddlepaddle_gpu-0.0.0-cp27-cp27mu-linux_x86_64.whl
# if failed, build paddle
if [ $? -ne 0 ];then
Expand Down
46 changes: 24 additions & 22 deletions doc/paddle/api/alias_api_mapping

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/paddle/api/api_label
Original file line number Diff line number Diff line change
Expand Up @@ -1050,3 +1050,4 @@ Decoder .. _api_paddle_fluid_layers_Decoder:
DetectionMAP .. _api_paddle_fluid_metrics_DetectionMAP:
ModelAverage .. _api_paddle_fluid_optimizer_ModelAverage:
lstm .. _api_paddle_fluid_layers_lstm:
Lamb .. _api_paddle_optimizer_lamb_Lamb:
2 changes: 1 addition & 1 deletion doc/paddle/api/index_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ API 文档
| | ProgBarLogger 等。 |
+-------------------------------+-------------------------------------------------------+
| paddle.nn | 组网相关的API,例如 Linear 、卷积 Conv2D 、 |
| | 循环神经网络 LSTM 、损失函数 CrossEntropyLoss 、 |
| | 循环神经网络 RNN 、损失函数 CrossEntropyLoss 、 |
| | 激活函数 ReLU 等。 |
+-------------------------------+-------------------------------------------------------+
| paddle.static | 静态图下基础框架相关API,比如:Variable, Program, |
Expand Down
2 changes: 1 addition & 1 deletion doc/paddle/api/index_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In this version, PaddlePaddle has made many optimizations to the APIs. You can r
| | ProgBarLogger, etc. |
+-------------------------------+-------------------------------------------------------+
| paddle.nn | Networking-related APIs such as Linear, Conv2D, |
| | CrossEntropyLoss, LSTM,and ReLU |
| | CrossEntropyLoss, RNN,and ReLU |
+-------------------------------+-------------------------------------------------------+
| paddle.static | Basic framework related APIs under static graph, |
| | such as Variable, Program, Executor, etc. |
Expand Down
1 change: 1 addition & 0 deletions doc/paddle/api/not_display_doc_list
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ paddle.hapi.progressbar.ProgressBar
paddle.fluid.contrib
paddle.reader
paddle.dataset
paddle.utils.op_version.OpLastCheckpointChecker
58 changes: 58 additions & 0 deletions doc/paddle/api/paddle/amp/Overview_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. _cn_overview_amp:

paddle.amp
---------------------

paddle.amp 目录下包含飞桨框架支持的动态图自动混合精度(AMP)相关的API。具体如下:

- :ref:`AMP相关API <about_amp>`
- :ref:`开启AMP后默认转化为float16计算的相关OP <about_amp_white_list_ops>`
- :ref:`开启AMP后默认使用float32计算的相关OP <about_amp_black_list_ops>`



.. _about_amp:
AMP相关API
::::::::::::::::::::

.. csv-table::
:header: "API名称", "API功能"
:widths: 10, 30

" :ref:`auto_cast <cn_api_amp_auto_cast>` ", "创建AMP上下文环境"
" :ref:`GradScaler <cn_api_amp_GradScaler>` ", "控制loss的缩放比例"

.. _about_amp_white_list_ops:
开启AMP后默认转化为float16计算的相关OP
:::::::::::::::::::::::

.. csv-table::
:header: "OP名称", "OP功能"
:widths: 10, 30

"conv2d", "卷积计算"
"matmul", "矩阵乘法"
"matmul_v2", "矩阵乘法"
"mul", "矩阵乘法"

.. _about_amp_black_list_ops:
开启AMP后默认使用float32计算的相关OP
:::::::::::::::::::::::

.. csv-table::
:header: "OP名称", "OP功能"
:widths: 10, 30

"exp", "指数运算"
"square", "平方运算"
"log", "对数运算"
"mean", "取平均值"
"sum", "求和运算"
"cos_sim", "余弦相似度"
"softmax", "softmax操作"
"softmax_with_cross_entropy", "softmax交叉熵损失函数"
"sigmoid_cross_entropy_with_logits", "按元素的概率误差"
"cross_entropy", "交叉熵"
"cross_entropy2", "交叉熵"


24 changes: 24 additions & 0 deletions doc/paddle/api/paddle/distribution/Overview_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. _cn_overview_distribution:

paddle.distribution
---------------------

paddle.distribution 目录下包含飞桨框架支持的概率分布相关的API。具体如下:

- :ref:`概率分布相关API <about_distribution>`



.. _about_distribution:
概率分布相关API
::::::::::::::::::::

.. csv-table::
:header: "API名称", "API功能"
:widths: 10, 30

" :ref:`Distribution <cn_api_distribution_Distribution>` ", "Distribution概率分布抽象基类"
" :ref:`Categorical <cn_api_distribution_Categorical>` ", "Categorical概率分布类"
" :ref:`Normal <cn_api_distribution_Normal>` ", "Normal概率分布类"
" :ref:`Uniform <cn_api_distribution_Uniform>` ", "Uniform概率分布类"

2 changes: 1 addition & 1 deletion doc/paddle/api/paddle/fluid/clip/ClipGradByValue_cn.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _cn_api_fluid_clip_ClipGradByValue
.. _cn_api_fluid_clip_ClipGradByValue:

ClipGradByValue
-------------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/paddle/api/paddle/fluid/core/CPUPlace_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
CPUPlace
-------------------------------

.. py:class:: paddle.fluid.CPUPlace
.. py:class:: paddle.CPUPlace
Expand Down
2 changes: 1 addition & 1 deletion doc/paddle/api/paddle/fluid/core/CUDAPinnedPlace_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
CUDAPinnedPlace
-------------------------------

.. py:class:: paddle.fluid.CUDAPinnedPlace
.. py:class:: paddle.CUDAPinnedPlace



Expand Down
29 changes: 29 additions & 0 deletions doc/paddle/api/paddle/fluid/core/XPUPlace_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _cn_api_fluid_XPUPlace:

XPUPlace
-------------------------------

.. py:class:: paddle.XPUPlace





``XPUPlace`` 是一个设备描述符,表示一个分配或将要分配 ``Tensor`` 的 Baidu Kunlun XPU 设备。
每个 ``XPUPlace`` 有一个 ``dev_id`` (设备id)来表明当前的 ``XPUPlace`` 所代表的显卡编号,编号从 0 开始。
``dev_id`` 不同的 ``XPUPlace`` 所对应的内存不可相互访问。

参数:
- **id** (int,可选) - XPU的设备ID。如果为 ``None``,则默认会使用 id 为 0 的设备。默认值为 ``None``。

**代码示例**

.. code-block:: python

import paddle

place = paddle.XPUPlace(0)




17 changes: 8 additions & 9 deletions doc/paddle/api/paddle/fluid/dygraph/BatchNorm_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BatchNorm
-------------------------------

.. py:class:: paddle.fluid.dygraph.BatchNorm(num_channels, act=None, is_test=False, momentum=0.9, epsilon=1e-05, param_attr=None, bias_attr=None, dtype='float32', data_layout='NCHW', in_place=False, moving_mean_name=None, moving_variance_name=None, do_model_average_for_mean_and_var=False, use_global_stats=False, trainable_statistics=False)
.. py:class:: paddle.nn.BatchNorm(num_channels, act=None, is_test=False, momentum=0.9, epsilon=1e-05, param_attr=None, bias_attr=None, dtype='float32', data_layout='NCHW', in_place=False, moving_mean_name=None, moving_variance_name=None, do_model_average_for_mean_and_var=False, use_global_stats=False, trainable_statistics=False)



Expand Down Expand Up @@ -60,14 +60,13 @@ BatchNorm

.. code-block:: python

import paddle.fluid as fluid
from paddle.fluid.dygraph.base import to_variable
import paddle
import numpy as np

x = np.random.random(size=(3, 10, 3, 7)).astype('float32')
with fluid.dygraph.guard():
x = to_variable(x)
batch_norm = fluid.BatchNorm(10)
hidden1 = batch_norm(x)

x_data = np.random.random(size=(3, 10, 3, 7)).astype('float32')
x = paddle.to_tensor(x_data)
batch_norm = paddle.nn.BatchNorm(10)
batch_norm_out = batch_norm(x)

print(batch_norm_out.shape)
# [3, 10, 3, 7]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _cn_api_fluid_dygraph_ProgramTranslator
.. _cn_api_fluid_dygraph_ProgramTranslator:

ProgramTranslator
-------------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/paddle/api/paddle/fluid/executor/Executor_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ infer_from_dataset的文档与train_from_dataset几乎完全相同,只是在
- **scope** (Scope) – 执行这个program的域,用户可以指定不同的域。默认为全局域
- **thread** (int) – 用户想要在这个函数中运行的线程数量。线程的实际数量为min(Dataset.thread_num, thread),如果thread > 0,默认为0
- **debug** (bool) – 是否开启debug模式,默认为False
- **fetch_list** (Tensor List) – 返回变量列表,每个变量都会在训练过程中被打印出来,默认为None
- **fetch_list** (Tensor List) – 返回变量列表,每个变量都会在预测过程中被打印出来,默认为None
- **fetch_info** (String List) – 每个变量的打印信息,默认为None
- **print_period** (int) – 每两次打印之间间隔的mini-batches的数量,默认为100

Expand Down
2 changes: 1 addition & 1 deletion doc/paddle/api/paddle/fluid/executor/scope_guard_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scope_guard
-------------------------------


.. py:function:: paddle.fluid.executor.scope_guard (scope)
.. py:function:: paddle.static.scope_guard (scope)
Expand Down
Loading