diff --git a/doc/fluid/advanced_usage/deploy/index_cn.rst b/doc/fluid/advanced_usage/deploy/index_cn.rst
index 6be367358338d073e5dbd47e7b4874e1069acc59..235fd1055430f9b62b2279c654b66bb384cf8ed1 100644
--- a/doc/fluid/advanced_usage/deploy/index_cn.rst
+++ b/doc/fluid/advanced_usage/deploy/index_cn.rst
@@ -2,7 +2,7 @@
预测部署
########
-- `原生预测引擎 `_ :介绍了支持模型部署上线的Fluid C++ API
+- `服务器端部署 `_ :介绍了支持模型部署上线的Fluid C++ API
- `移动端部署 `_:介绍了 PaddlePaddle组织下的嵌入式平台深度学习框架Paddle-Mobile
diff --git a/doc/fluid/advanced_usage/deploy/inference/index_cn.rst b/doc/fluid/advanced_usage/deploy/inference/index_cn.rst
index 7f7a0a1020613712b9f3368fb9bec44c01a7b555..809613eabab62a792fadb7fff03a9ee5f2f132cf 100644
--- a/doc/fluid/advanced_usage/deploy/inference/index_cn.rst
+++ b/doc/fluid/advanced_usage/deploy/inference/index_cn.rst
@@ -1,11 +1,11 @@
############
-原生预测引擎
+服务器端部署
############
PaddlePaddle Fluid 提供了 C++ API 来支持模型的部署上线
.. toctree::
- :hidden:
+ :titlesonly:
build_and_install_lib_cn.rst
native_infer.md
diff --git a/doc/fluid/advanced_usage/deploy/inference/windows_cpp_inference.md b/doc/fluid/advanced_usage/deploy/inference/windows_cpp_inference.md
index b6a5a2168be98dab64d67d4ac9653340465e21d9..6340f330ba1962430c98d852033c40879170a175 100644
--- a/doc/fluid/advanced_usage/deploy/inference/windows_cpp_inference.md
+++ b/doc/fluid/advanced_usage/deploy/inference/windows_cpp_inference.md
@@ -48,33 +48,33 @@ Cmake可以在[官网进行下载](https://cmake.org/download/),并添加到
执行完毕后,build 目录如图所示,打开箭头指向的 solution 文件:
-
+
修改编译属性为 `/MT` :
-
+
-
+
编译生成选项改成 `Release` 。
-
+
-
+
将提供的依赖包中,Release下的openblas和模型文件拷贝到编译生成的Release下。
-
+
通过cmd进到Release目录执行:
@@ -88,6 +88,6 @@ Cmake可以在[官网进行下载](https://cmake.org/download/),并添加到
`simple_on_word2vec.exe --dirname=.\word2vec.inference.model`
-
+
diff --git a/doc/fluid/advanced_usage/development/profiling/index_cn.rst b/doc/fluid/advanced_usage/development/profiling/index_cn.rst
index 7baf05134332ec22e8db837aad05877e01fab558..db40144354e9acbdf061834ccbbe6b7fc3518a6f 100644
--- a/doc/fluid/advanced_usage/development/profiling/index_cn.rst
+++ b/doc/fluid/advanced_usage/development/profiling/index_cn.rst
@@ -2,6 +2,15 @@
性能调优
##########
+.. toctree::
+ :hidden:
+
+ benchmark.rst
+ cpu_profiling_cn.md
+ gpu_profiling_cn.rst
+ host_memory_profiling_cn.md
+ timeline_cn.md
+
本模块介绍 Fluid 使用过程中的调优方法,包括:
- `如何进行基准测试 `_:介绍如何选择基准模型,从而验证模型的精度和性能
@@ -11,11 +20,3 @@
- `Timeline工具简介 `_ :介绍如何使用 Timeline 工具进行性能分析和调优
-.. toctree::
- :hidden:
-
- benchmark.rst
- cpu_profiling_cn.md
- gpu_profiling_cn.rst
- host_memory_profiling_cn.md
- timeline_cn.md
diff --git a/doc/fluid/api/api_guides/high_low_level_api.md b/doc/fluid/api/api_guides/high_low_level_api.md
index 8ce2695737c45306c9a0944c35b2e865ce380f05..d95a2f89eb6913ed0b23ce7eaf0613ec44529356 100644
--- a/doc/fluid/api/api_guides/high_low_level_api.md
+++ b/doc/fluid/api/api_guides/high_low_level_api.md
@@ -1,15 +1,15 @@
## High/Low-level API简介
-Paddle目前有2套API接口:
+PaddlePaddle Fluid目前有2套API接口:
- Low-level(底层) API:
- 灵活性强并且已经相对成熟,使用它训练的模型,能直接支持C++预测上线。
- - 提供了大量的模型作为使用示例,包括[Book](https://github.com/PaddlePaddle/book)中的第7和8章,以及[models](https://github.com/PaddlePaddle/models)中的所有章节。
+ - 提供了大量的模型作为使用示例,包括[Book](https://github.com/PaddlePaddle/book)中的全部章节,以及[models](https://github.com/PaddlePaddle/models)中的所有章节。
- 适用人群:对深度学习有一定了解,需要自定义网络进行训练/预测/上线部署的用户。
- High-level(高层)API:
- - 使用简单,[Book](https://github.com/PaddlePaddle/book)中前六章提供了示例。
+ - 使用简单
- 尚未成熟,接口暂时在[paddle.fluid.contrib](https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/fluid/contrib)下面。
- 适用人群:想通过Book课程进行深度学习基础知识学习的初级用户。
diff --git a/doc/fluid/api/average.rst b/doc/fluid/api/average.rst
index b91bfcfb6e36e345c9687eb14cb216adb56cc77a..496f5b29875443f0c44f50fcb3ca837f4e7bcd12 100644
--- a/doc/fluid/api/average.rst
+++ b/doc/fluid/api/average.rst
@@ -14,5 +14,3 @@ WeightedAverage
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_average_WeightedAverage`
-
diff --git a/doc/fluid/api/backward.rst b/doc/fluid/api/backward.rst
index b18a0d796240acd8449da15f9d675e7e836864a3..0076394543c2f87e90fa1ea989d7b5cbf468a6f7 100644
--- a/doc/fluid/api/backward.rst
+++ b/doc/fluid/api/backward.rst
@@ -13,5 +13,3 @@ append_backward
.. autofunction:: paddle.fluid.backward.append_backward
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_backward_append_backward`
-
diff --git a/doc/fluid/api/clip.rst b/doc/fluid/api/clip.rst
index 7c26323414d7f6acece4c651b9a8fc295164b8f7..8597d40ca4e6a80abb85a82c9748b91bb7d4bafb 100644
--- a/doc/fluid/api/clip.rst
+++ b/doc/fluid/api/clip.rst
@@ -14,8 +14,6 @@ ErrorClipByValue
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_clip_ErrorClipByValue`
-
.. _api_fluid_clip_GradientClipByGlobalNorm:
GradientClipByGlobalNorm
@@ -25,8 +23,6 @@ GradientClipByGlobalNorm
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_clip_GradientClipByGlobalNorm`
-
.. _api_fluid_clip_GradientClipByNorm:
GradientClipByNorm
@@ -36,8 +32,6 @@ GradientClipByNorm
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_clip_GradientClipByNorm`
-
.. _api_fluid_clip_GradientClipByValue:
GradientClipByValue
@@ -47,5 +41,3 @@ GradientClipByValue
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_clip_GradientClipByValue`
-
diff --git a/doc/fluid/api/data_feeder.rst b/doc/fluid/api/data_feeder.rst
index 6ea67e62ffceb360fb1c0568614d0383e8d2b808..11d2890f5b3446e37c3ef31e5a17ebebe169dbc8 100644
--- a/doc/fluid/api/data_feeder.rst
+++ b/doc/fluid/api/data_feeder.rst
@@ -14,5 +14,3 @@ DataFeeder
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_data_feeder_DataFeeder`
-
diff --git a/doc/fluid/api/executor.rst b/doc/fluid/api/executor.rst
index 143f9794c85d399f856f796a5d1fc287d2dfe419..82e8a8f820b5313eecf66704857daf8e60460846 100644
--- a/doc/fluid/api/executor.rst
+++ b/doc/fluid/api/executor.rst
@@ -14,8 +14,6 @@ Executor
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_executor_Executor`
-
.. _api_fluid_executor_global_scope:
global_scope
@@ -24,8 +22,6 @@ global_scope
.. autofunction:: paddle.fluid.executor.global_scope
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_executor_global_scope`
-
.. _api_fluid_executor_scope_guard:
scope_guard
@@ -34,5 +30,3 @@ scope_guard
.. autofunction:: paddle.fluid.executor.scope_guard
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_executor_scope_guard`
-
diff --git a/doc/fluid/api/fluid.rst b/doc/fluid/api/fluid.rst
index fc5aaa802270fcdebeaf89e59a8e39cc8eeff831..19ae372cef8d25892053776c591bafaf21ca198f 100644
--- a/doc/fluid/api/fluid.rst
+++ b/doc/fluid/api/fluid.rst
@@ -14,8 +14,6 @@ AsyncExecutor
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_AsyncExecutor`
-
.. _api_fluid_BuildStrategy:
BuildStrategy
@@ -25,8 +23,6 @@ BuildStrategy
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_BuildStrategy`
-
.. _api_fluid_CPUPlace:
CPUPlace
@@ -36,8 +32,6 @@ CPUPlace
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_CPUPlace`
-
.. _api_fluid_create_lod_tensor:
create_lod_tensor
@@ -46,8 +40,6 @@ create_lod_tensor
.. autofunction:: paddle.fluid.create_lod_tensor
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_create_lod_tensor`
-
.. _api_fluid_create_random_int_lodtensor:
create_random_int_lodtensor
@@ -56,8 +48,6 @@ create_random_int_lodtensor
.. autofunction:: paddle.fluid.create_random_int_lodtensor
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_create_random_int_lodtensor`
-
.. _api_fluid_CUDAPinnedPlace:
CUDAPinnedPlace
@@ -67,8 +57,6 @@ CUDAPinnedPlace
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_CUDAPinnedPlace`
-
.. _api_fluid_CUDAPlace:
CUDAPlace
@@ -78,8 +66,6 @@ CUDAPlace
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_CUDAPlace`
-
.. _api_fluid_DataFeedDesc:
DataFeedDesc
@@ -89,8 +75,6 @@ DataFeedDesc
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_DataFeedDesc`
-
.. _api_fluid_DataFeeder:
DataFeeder
@@ -100,8 +84,6 @@ DataFeeder
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_DataFeeder`
-
.. _api_fluid_default_main_program:
default_main_program
@@ -110,8 +92,6 @@ default_main_program
.. autofunction:: paddle.fluid.default_main_program
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_default_main_program`
-
.. _api_fluid_default_startup_program:
default_startup_program
@@ -120,8 +100,6 @@ default_startup_program
.. autofunction:: paddle.fluid.default_startup_program
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_default_startup_program`
-
.. _api_fluid_DistributeTranspiler:
DistributeTranspiler
@@ -131,8 +109,6 @@ DistributeTranspiler
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_DistributeTranspiler`
-
.. _api_fluid_DistributeTranspilerConfig:
DistributeTranspilerConfig
@@ -142,8 +118,6 @@ DistributeTranspilerConfig
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_DistributeTranspilerConfig`
-
.. _api_fluid_ExecutionStrategy:
ExecutionStrategy
@@ -153,8 +127,6 @@ ExecutionStrategy
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_ExecutionStrategy`
-
.. _api_fluid_Executor:
Executor
@@ -164,8 +136,6 @@ Executor
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_Executor`
-
.. _api_fluid_global_scope:
global_scope
@@ -174,8 +144,6 @@ global_scope
.. autofunction:: paddle.fluid.global_scope
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_global_scope`
-
.. _api_fluid_LoDTensor:
LoDTensor
@@ -185,8 +153,6 @@ LoDTensor
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_LoDTensor`
-
.. _api_fluid_LoDTensorArray:
LoDTensorArray
@@ -196,8 +162,6 @@ LoDTensorArray
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_LoDTensorArray`
-
.. _api_fluid_memory_optimize:
memory_optimize
@@ -206,8 +170,6 @@ memory_optimize
.. autofunction:: paddle.fluid.memory_optimize
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_memory_optimize`
-
.. _api_fluid_name_scope:
name_scope
@@ -216,8 +178,6 @@ name_scope
.. autofunction:: paddle.fluid.name_scope
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_name_scope`
-
.. _api_fluid_ParallelExecutor:
ParallelExecutor
@@ -227,8 +187,6 @@ ParallelExecutor
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_ParallelExecutor`
-
.. _api_fluid_ParamAttr:
ParamAttr
@@ -238,8 +196,6 @@ ParamAttr
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_ParamAttr`
-
.. _api_fluid_Program:
Program
@@ -249,8 +205,6 @@ Program
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_Program`
-
.. _api_fluid_program_guard:
program_guard
@@ -259,8 +213,6 @@ program_guard
.. autofunction:: paddle.fluid.program_guard
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_program_guard`
-
.. _api_fluid_release_memory:
release_memory
@@ -269,8 +221,6 @@ release_memory
.. autofunction:: paddle.fluid.release_memory
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_release_memory`
-
.. _api_fluid_Scope:
Scope
@@ -280,8 +230,6 @@ Scope
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_Scope`
-
.. _api_fluid_scope_guard:
scope_guard
@@ -290,8 +238,6 @@ scope_guard
.. autofunction:: paddle.fluid.scope_guard
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_scope_guard`
-
.. _api_fluid_Tensor:
Tensor
@@ -301,8 +247,6 @@ Tensor
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_Tensor`
-
.. _api_fluid_WeightNormParamAttr:
WeightNormParamAttr
@@ -312,5 +256,3 @@ WeightNormParamAttr
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_WeightNormParamAttr`
-
diff --git a/doc/fluid/api/initializer.rst b/doc/fluid/api/initializer.rst
index 8a149e3bf5b7a16ae462eb2d3929e9d20640d4fd..ce2036675581b81b8dff6492ed2046e6f656f644 100644
--- a/doc/fluid/api/initializer.rst
+++ b/doc/fluid/api/initializer.rst
@@ -14,8 +14,6 @@ Bilinear
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_Bilinear`
-
.. _api_fluid_initializer_BilinearInitializer:
BilinearInitializer
@@ -25,8 +23,6 @@ BilinearInitializer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_BilinearInitializer`
-
.. _api_fluid_initializer_Constant:
Constant
@@ -36,8 +32,6 @@ Constant
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_Constant`
-
.. _api_fluid_initializer_ConstantInitializer:
ConstantInitializer
@@ -47,8 +41,6 @@ ConstantInitializer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_ConstantInitializer`
-
.. _api_fluid_initializer_force_init_on_cpu:
force_init_on_cpu
@@ -57,8 +49,6 @@ force_init_on_cpu
.. autofunction:: paddle.fluid.initializer.force_init_on_cpu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_force_init_on_cpu`
-
.. _api_fluid_initializer_init_on_cpu:
init_on_cpu
@@ -67,8 +57,6 @@ init_on_cpu
.. autofunction:: paddle.fluid.initializer.init_on_cpu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_init_on_cpu`
-
.. _api_fluid_initializer_MSRA:
MSRA
@@ -78,8 +66,6 @@ MSRA
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_MSRA`
-
.. _api_fluid_initializer_MSRAInitializer:
MSRAInitializer
@@ -89,8 +75,6 @@ MSRAInitializer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_MSRAInitializer`
-
.. _api_fluid_initializer_Normal:
Normal
@@ -100,8 +84,6 @@ Normal
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_Normal`
-
.. _api_fluid_initializer_NormalInitializer:
NormalInitializer
@@ -111,8 +93,6 @@ NormalInitializer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_NormalInitializer`
-
.. _api_fluid_initializer_TruncatedNormal:
TruncatedNormal
@@ -122,8 +102,6 @@ TruncatedNormal
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_TruncatedNormal`
-
.. _api_fluid_initializer_TruncatedNormalInitializer:
TruncatedNormalInitializer
@@ -133,8 +111,6 @@ TruncatedNormalInitializer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_TruncatedNormalInitializer`
-
.. _api_fluid_initializer_Uniform:
Uniform
@@ -144,8 +120,6 @@ Uniform
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_Uniform`
-
.. _api_fluid_initializer_UniformInitializer:
UniformInitializer
@@ -155,8 +129,6 @@ UniformInitializer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_UniformInitializer`
-
.. _api_fluid_initializer_Xavier:
Xavier
@@ -166,8 +138,6 @@ Xavier
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_Xavier`
-
.. _api_fluid_initializer_XavierInitializer:
XavierInitializer
@@ -177,5 +147,3 @@ XavierInitializer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_initializer_XavierInitializer`
-
diff --git a/doc/fluid/api/io.rst b/doc/fluid/api/io.rst
index 922af9a23ea7b7a0a0b28dc89c7bbbbd25b65a2a..b3dc7f83ca7c604dbf87b06b756e66e172f0463f 100644
--- a/doc/fluid/api/io.rst
+++ b/doc/fluid/api/io.rst
@@ -13,8 +13,6 @@ load_inference_model
.. autofunction:: paddle.fluid.io.load_inference_model
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_load_inference_model`
-
.. _api_fluid_io_load_params:
load_params
@@ -23,8 +21,6 @@ load_params
.. autofunction:: paddle.fluid.io.load_params
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_load_params`
-
.. _api_fluid_io_load_persistables:
load_persistables
@@ -33,8 +29,6 @@ load_persistables
.. autofunction:: paddle.fluid.io.load_persistables
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_load_persistables`
-
.. _api_fluid_io_load_vars:
load_vars
@@ -43,8 +37,6 @@ load_vars
.. autofunction:: paddle.fluid.io.load_vars
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_load_vars`
-
.. _api_fluid_io_save_inference_model:
save_inference_model
@@ -53,8 +45,6 @@ save_inference_model
.. autofunction:: paddle.fluid.io.save_inference_model
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_save_inference_model`
-
.. _api_fluid_io_save_params:
save_params
@@ -63,8 +53,6 @@ save_params
.. autofunction:: paddle.fluid.io.save_params
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_save_params`
-
.. _api_fluid_io_save_persistables:
save_persistables
@@ -73,8 +61,6 @@ save_persistables
.. autofunction:: paddle.fluid.io.save_persistables
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_save_persistables`
-
.. _api_fluid_io_save_vars:
save_vars
@@ -83,5 +69,3 @@ save_vars
.. autofunction:: paddle.fluid.io.save_vars
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_io_save_vars`
-
diff --git a/doc/fluid/api/layers.rst b/doc/fluid/api/layers.rst
index 96a8c5d01716574cebc8b46779f55e9b94068cf9..688d7d502ccb52668d6cd484fed5041496e4cfea 100644
--- a/doc/fluid/api/layers.rst
+++ b/doc/fluid/api/layers.rst
@@ -16,8 +16,6 @@ array_length
.. autofunction:: paddle.fluid.layers.array_length
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_array_length`
-
.. _api_fluid_layers_array_read:
array_read
@@ -26,8 +24,6 @@ array_read
.. autofunction:: paddle.fluid.layers.array_read
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_array_read`
-
.. _api_fluid_layers_array_write:
array_write
@@ -36,8 +32,6 @@ array_write
.. autofunction:: paddle.fluid.layers.array_write
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_array_write`
-
.. _api_fluid_layers_create_array:
create_array
@@ -46,8 +40,6 @@ create_array
.. autofunction:: paddle.fluid.layers.create_array
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_create_array`
-
.. _api_fluid_layers_DynamicRNN:
DynamicRNN
@@ -57,8 +49,6 @@ DynamicRNN
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_DynamicRNN`
-
.. _api_fluid_layers_equal:
equal
@@ -67,8 +57,6 @@ equal
.. autofunction:: paddle.fluid.layers.equal
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_equal`
-
.. _api_fluid_layers_IfElse:
IfElse
@@ -78,8 +66,6 @@ IfElse
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_IfElse`
-
.. _api_fluid_layers_increment:
increment
@@ -88,8 +74,6 @@ increment
.. autofunction:: paddle.fluid.layers.increment
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_increment`
-
.. _api_fluid_layers_is_empty:
is_empty
@@ -98,8 +82,6 @@ is_empty
.. autofunction:: paddle.fluid.layers.is_empty
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_is_empty`
-
.. _api_fluid_layers_less_than:
less_than
@@ -108,8 +90,6 @@ less_than
.. autofunction:: paddle.fluid.layers.less_than
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_less_than`
-
.. _api_fluid_layers_Print:
Print
@@ -118,8 +98,6 @@ Print
.. autofunction:: paddle.fluid.layers.Print
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_Print`
-
.. _api_fluid_layers_reorder_lod_tensor_by_rank:
reorder_lod_tensor_by_rank
@@ -128,8 +106,6 @@ reorder_lod_tensor_by_rank
.. autofunction:: paddle.fluid.layers.reorder_lod_tensor_by_rank
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reorder_lod_tensor_by_rank`
-
.. _api_fluid_layers_StaticRNN:
StaticRNN
@@ -139,8 +115,6 @@ StaticRNN
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_StaticRNN`
-
.. _api_fluid_layers_Switch:
Switch
@@ -150,8 +124,6 @@ Switch
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_Switch`
-
.. _api_fluid_layers_While:
While
@@ -161,8 +133,6 @@ While
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_While`
-
device
======
@@ -177,8 +147,6 @@ batch
.. autofunction:: paddle.fluid.layers.batch
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_batch`
-
.. _api_fluid_layers_create_py_reader_by_data:
create_py_reader_by_data
@@ -187,8 +155,6 @@ create_py_reader_by_data
.. autofunction:: paddle.fluid.layers.create_py_reader_by_data
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_create_py_reader_by_data`
-
.. _api_fluid_layers_data:
data
@@ -197,8 +163,6 @@ data
.. autofunction:: paddle.fluid.layers.data
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_data`
-
.. _api_fluid_layers_double_buffer:
double_buffer
@@ -207,8 +171,6 @@ double_buffer
.. autofunction:: paddle.fluid.layers.double_buffer
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_double_buffer`
-
.. _api_fluid_layers_load:
load
@@ -217,8 +179,6 @@ load
.. autofunction:: paddle.fluid.layers.load
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_load`
-
.. _api_fluid_layers_open_files:
open_files
@@ -227,8 +187,6 @@ open_files
.. autofunction:: paddle.fluid.layers.open_files
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_open_files`
-
.. _api_fluid_layers_Preprocessor:
Preprocessor
@@ -238,8 +196,6 @@ Preprocessor
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_Preprocessor`
-
.. _api_fluid_layers_py_reader:
py_reader
@@ -248,8 +204,6 @@ py_reader
.. autofunction:: paddle.fluid.layers.py_reader
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_py_reader`
-
.. _api_fluid_layers_random_data_generator:
random_data_generator
@@ -258,8 +212,6 @@ random_data_generator
.. autofunction:: paddle.fluid.layers.random_data_generator
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_random_data_generator`
-
.. _api_fluid_layers_read_file:
read_file
@@ -268,8 +220,6 @@ read_file
.. autofunction:: paddle.fluid.layers.read_file
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_read_file`
-
.. _api_fluid_layers_shuffle:
shuffle
@@ -278,8 +228,6 @@ shuffle
.. autofunction:: paddle.fluid.layers.shuffle
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_shuffle`
-
nn
==
@@ -291,8 +239,6 @@ add_position_encoding
.. autofunction:: paddle.fluid.layers.add_position_encoding
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_add_position_encoding`
-
.. _api_fluid_layers_affine_channel:
affine_channel
@@ -301,8 +247,6 @@ affine_channel
.. autofunction:: paddle.fluid.layers.affine_channel
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_affine_channel`
-
.. _api_fluid_layers_affine_grid:
affine_grid
@@ -311,8 +255,6 @@ affine_grid
.. autofunction:: paddle.fluid.layers.affine_grid
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_affine_grid`
-
.. _api_fluid_layers_autoincreased_step_counter:
autoincreased_step_counter
@@ -321,8 +263,6 @@ autoincreased_step_counter
.. autofunction:: paddle.fluid.layers.autoincreased_step_counter
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_autoincreased_step_counter`
-
.. _api_fluid_layers_batch_norm:
batch_norm
@@ -331,8 +271,6 @@ batch_norm
.. autofunction:: paddle.fluid.layers.batch_norm
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_batch_norm`
-
.. _api_fluid_layers_beam_search:
beam_search
@@ -341,8 +279,6 @@ beam_search
.. autofunction:: paddle.fluid.layers.beam_search
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_beam_search`
-
.. _api_fluid_layers_beam_search_decode:
beam_search_decode
@@ -351,8 +287,6 @@ beam_search_decode
.. autofunction:: paddle.fluid.layers.beam_search_decode
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_beam_search_decode`
-
.. _api_fluid_layers_bilinear_tensor_product:
bilinear_tensor_product
@@ -361,8 +295,6 @@ bilinear_tensor_product
.. autofunction:: paddle.fluid.layers.bilinear_tensor_product
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_bilinear_tensor_product`
-
.. _api_fluid_layers_brelu:
brelu
@@ -371,8 +303,6 @@ brelu
.. autofunction:: paddle.fluid.layers.brelu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_brelu`
-
.. _api_fluid_layers_chunk_eval:
chunk_eval
@@ -381,8 +311,6 @@ chunk_eval
.. autofunction:: paddle.fluid.layers.chunk_eval
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_chunk_eval`
-
.. _api_fluid_layers_clip:
clip
@@ -391,8 +319,6 @@ clip
.. autofunction:: paddle.fluid.layers.clip
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_clip`
-
.. _api_fluid_layers_clip_by_norm:
clip_by_norm
@@ -401,8 +327,6 @@ clip_by_norm
.. autofunction:: paddle.fluid.layers.clip_by_norm
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_clip_by_norm`
-
.. _api_fluid_layers_conv2d:
conv2d
@@ -411,8 +335,6 @@ conv2d
.. autofunction:: paddle.fluid.layers.conv2d
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_conv2d`
-
.. _api_fluid_layers_conv2d_transpose:
conv2d_transpose
@@ -421,8 +343,6 @@ conv2d_transpose
.. autofunction:: paddle.fluid.layers.conv2d_transpose
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_conv2d_transpose`
-
.. _api_fluid_layers_conv3d:
conv3d
@@ -431,8 +351,6 @@ conv3d
.. autofunction:: paddle.fluid.layers.conv3d
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_conv3d`
-
.. _api_fluid_layers_conv3d_transpose:
conv3d_transpose
@@ -441,8 +359,6 @@ conv3d_transpose
.. autofunction:: paddle.fluid.layers.conv3d_transpose
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_conv3d_transpose`
-
.. _api_fluid_layers_cos_sim:
cos_sim
@@ -451,8 +367,6 @@ cos_sim
.. autofunction:: paddle.fluid.layers.cos_sim
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_cos_sim`
-
.. _api_fluid_layers_crf_decoding:
crf_decoding
@@ -461,8 +375,6 @@ crf_decoding
.. autofunction:: paddle.fluid.layers.crf_decoding
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_crf_decoding`
-
.. _api_fluid_layers_crop:
crop
@@ -471,8 +383,6 @@ crop
.. autofunction:: paddle.fluid.layers.crop
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_crop`
-
.. _api_fluid_layers_cross_entropy:
cross_entropy
@@ -481,8 +391,6 @@ cross_entropy
.. autofunction:: paddle.fluid.layers.cross_entropy
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_cross_entropy`
-
.. _api_fluid_layers_ctc_greedy_decoder:
ctc_greedy_decoder
@@ -491,8 +399,6 @@ ctc_greedy_decoder
.. autofunction:: paddle.fluid.layers.ctc_greedy_decoder
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_ctc_greedy_decoder`
-
.. _api_fluid_layers_dice_loss:
dice_loss
@@ -501,8 +407,6 @@ dice_loss
.. autofunction:: paddle.fluid.layers.dice_loss
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_dice_loss`
-
.. _api_fluid_layers_dropout:
dropout
@@ -511,8 +415,6 @@ dropout
.. autofunction:: paddle.fluid.layers.dropout
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_dropout`
-
.. _api_fluid_layers_dynamic_gru:
dynamic_gru
@@ -521,8 +423,6 @@ dynamic_gru
.. autofunction:: paddle.fluid.layers.dynamic_gru
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_dynamic_gru`
-
.. _api_fluid_layers_dynamic_lstm:
dynamic_lstm
@@ -531,8 +431,6 @@ dynamic_lstm
.. autofunction:: paddle.fluid.layers.dynamic_lstm
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_dynamic_lstm`
-
.. _api_fluid_layers_dynamic_lstmp:
dynamic_lstmp
@@ -541,8 +439,6 @@ dynamic_lstmp
.. autofunction:: paddle.fluid.layers.dynamic_lstmp
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_dynamic_lstmp`
-
.. _api_fluid_layers_edit_distance:
edit_distance
@@ -551,8 +447,6 @@ edit_distance
.. autofunction:: paddle.fluid.layers.edit_distance
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_edit_distance`
-
.. _api_fluid_layers_elementwise_add:
elementwise_add
@@ -561,8 +455,6 @@ elementwise_add
.. autofunction:: paddle.fluid.layers.elementwise_add
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elementwise_add`
-
.. _api_fluid_layers_elementwise_div:
elementwise_div
@@ -571,8 +463,6 @@ elementwise_div
.. autofunction:: paddle.fluid.layers.elementwise_div
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elementwise_div`
-
.. _api_fluid_layers_elementwise_max:
elementwise_max
@@ -581,8 +471,6 @@ elementwise_max
.. autofunction:: paddle.fluid.layers.elementwise_max
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elementwise_max`
-
.. _api_fluid_layers_elementwise_min:
elementwise_min
@@ -591,8 +479,6 @@ elementwise_min
.. autofunction:: paddle.fluid.layers.elementwise_min
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elementwise_min`
-
.. _api_fluid_layers_elementwise_mul:
elementwise_mul
@@ -601,8 +487,6 @@ elementwise_mul
.. autofunction:: paddle.fluid.layers.elementwise_mul
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elementwise_mul`
-
.. _api_fluid_layers_elementwise_pow:
elementwise_pow
@@ -611,8 +495,6 @@ elementwise_pow
.. autofunction:: paddle.fluid.layers.elementwise_pow
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elementwise_pow`
-
.. _api_fluid_layers_elementwise_sub:
elementwise_sub
@@ -621,8 +503,6 @@ elementwise_sub
.. autofunction:: paddle.fluid.layers.elementwise_sub
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elementwise_sub`
-
.. _api_fluid_layers_elu:
elu
@@ -631,8 +511,6 @@ elu
.. autofunction:: paddle.fluid.layers.elu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_elu`
-
.. _api_fluid_layers_embedding:
embedding
@@ -641,8 +519,6 @@ embedding
.. autofunction:: paddle.fluid.layers.embedding
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_embedding`
-
.. _api_fluid_layers_expand:
expand
@@ -651,8 +527,6 @@ expand
.. autofunction:: paddle.fluid.layers.expand
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_expand`
-
.. _api_fluid_layers_fc:
fc
@@ -661,8 +535,6 @@ fc
.. autofunction:: paddle.fluid.layers.fc
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_fc`
-
.. _api_fluid_layers_flatten:
flatten
@@ -671,8 +543,6 @@ flatten
.. autofunction:: paddle.fluid.layers.flatten
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_flatten`
-
.. _api_fluid_layers_gather:
gather
@@ -681,8 +551,6 @@ gather
.. autofunction:: paddle.fluid.layers.gather
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_gather`
-
.. _api_fluid_layers_gaussian_random:
gaussian_random
@@ -691,8 +559,6 @@ gaussian_random
.. autofunction:: paddle.fluid.layers.gaussian_random
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_gaussian_random`
-
.. _api_fluid_layers_gaussian_random_batch_size_like:
gaussian_random_batch_size_like
@@ -701,8 +567,6 @@ gaussian_random_batch_size_like
.. autofunction:: paddle.fluid.layers.gaussian_random_batch_size_like
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_gaussian_random_batch_size_like`
-
.. _api_fluid_layers_get_tensor_from_selected_rows:
get_tensor_from_selected_rows
@@ -711,8 +575,6 @@ get_tensor_from_selected_rows
.. autofunction:: paddle.fluid.layers.get_tensor_from_selected_rows
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_get_tensor_from_selected_rows`
-
.. _api_fluid_layers_grid_sampler:
grid_sampler
@@ -721,8 +583,6 @@ grid_sampler
.. autofunction:: paddle.fluid.layers.grid_sampler
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_grid_sampler`
-
.. _api_fluid_layers_group_norm:
group_norm
@@ -731,8 +591,6 @@ group_norm
.. autofunction:: paddle.fluid.layers.group_norm
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_group_norm`
-
.. _api_fluid_layers_gru_unit:
gru_unit
@@ -741,8 +599,6 @@ gru_unit
.. autofunction:: paddle.fluid.layers.gru_unit
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_gru_unit`
-
.. _api_fluid_layers_hard_sigmoid:
hard_sigmoid
@@ -751,8 +607,6 @@ hard_sigmoid
.. autofunction:: paddle.fluid.layers.hard_sigmoid
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_hard_sigmoid`
-
.. _api_fluid_layers_hash:
hash
@@ -761,8 +615,6 @@ hash
.. autofunction:: paddle.fluid.layers.hash
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_hash`
-
.. _api_fluid_layers_hsigmoid:
hsigmoid
@@ -771,8 +623,6 @@ hsigmoid
.. autofunction:: paddle.fluid.layers.hsigmoid
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_hsigmoid`
-
.. _api_fluid_layers_im2sequence:
im2sequence
@@ -781,8 +631,6 @@ im2sequence
.. autofunction:: paddle.fluid.layers.im2sequence
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_im2sequence`
-
.. _api_fluid_layers_image_resize:
image_resize
@@ -791,8 +639,6 @@ image_resize
.. autofunction:: paddle.fluid.layers.image_resize
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_image_resize`
-
.. _api_fluid_layers_image_resize_short:
image_resize_short
@@ -801,8 +647,6 @@ image_resize_short
.. autofunction:: paddle.fluid.layers.image_resize_short
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_image_resize_short`
-
.. _api_fluid_layers_l2_normalize:
l2_normalize
@@ -811,8 +655,6 @@ l2_normalize
.. autofunction:: paddle.fluid.layers.l2_normalize
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_l2_normalize`
-
.. _api_fluid_layers_label_smooth:
label_smooth
@@ -821,8 +663,6 @@ label_smooth
.. autofunction:: paddle.fluid.layers.label_smooth
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_label_smooth`
-
.. _api_fluid_layers_layer_norm:
layer_norm
@@ -831,8 +671,6 @@ layer_norm
.. autofunction:: paddle.fluid.layers.layer_norm
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_layer_norm`
-
.. _api_fluid_layers_leaky_relu:
leaky_relu
@@ -841,8 +679,6 @@ leaky_relu
.. autofunction:: paddle.fluid.layers.leaky_relu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_leaky_relu`
-
.. _api_fluid_layers_linear_chain_crf:
linear_chain_crf
@@ -851,8 +687,6 @@ linear_chain_crf
.. autofunction:: paddle.fluid.layers.linear_chain_crf
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_linear_chain_crf`
-
.. _api_fluid_layers_lod_reset:
lod_reset
@@ -861,8 +695,6 @@ lod_reset
.. autofunction:: paddle.fluid.layers.lod_reset
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_lod_reset`
-
.. _api_fluid_layers_log:
log
@@ -871,8 +703,6 @@ log
.. autofunction:: paddle.fluid.layers.log
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_log`
-
.. _api_fluid_layers_log_loss:
log_loss
@@ -881,8 +711,6 @@ log_loss
.. autofunction:: paddle.fluid.layers.log_loss
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_log_loss`
-
.. _api_fluid_layers_logical_and:
logical_and
@@ -891,8 +719,6 @@ logical_and
.. autofunction:: paddle.fluid.layers.logical_and
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_logical_and`
-
.. _api_fluid_layers_logical_not:
logical_not
@@ -901,8 +727,6 @@ logical_not
.. autofunction:: paddle.fluid.layers.logical_not
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_logical_not`
-
.. _api_fluid_layers_logical_or:
logical_or
@@ -911,8 +735,6 @@ logical_or
.. autofunction:: paddle.fluid.layers.logical_or
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_logical_or`
-
.. _api_fluid_layers_logical_xor:
logical_xor
@@ -921,8 +743,6 @@ logical_xor
.. autofunction:: paddle.fluid.layers.logical_xor
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_logical_xor`
-
.. _api_fluid_layers_lrn:
lrn
@@ -931,8 +751,6 @@ lrn
.. autofunction:: paddle.fluid.layers.lrn
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_lrn`
-
.. _api_fluid_layers_lstm:
lstm
@@ -941,8 +759,6 @@ lstm
.. autofunction:: paddle.fluid.layers.lstm
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_lstm`
-
.. _api_fluid_layers_lstm_unit:
lstm_unit
@@ -951,8 +767,6 @@ lstm_unit
.. autofunction:: paddle.fluid.layers.lstm_unit
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_lstm_unit`
-
.. _api_fluid_layers_margin_rank_loss:
margin_rank_loss
@@ -961,8 +775,6 @@ margin_rank_loss
.. autofunction:: paddle.fluid.layers.margin_rank_loss
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_margin_rank_loss`
-
.. _api_fluid_layers_matmul:
matmul
@@ -971,8 +783,6 @@ matmul
.. autofunction:: paddle.fluid.layers.matmul
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_matmul`
-
.. _api_fluid_layers_maxout:
maxout
@@ -981,8 +791,6 @@ maxout
.. autofunction:: paddle.fluid.layers.maxout
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_maxout`
-
.. _api_fluid_layers_mean:
mean
@@ -991,8 +799,6 @@ mean
.. autofunction:: paddle.fluid.layers.mean
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_mean`
-
.. _api_fluid_layers_mean_iou:
mean_iou
@@ -1001,8 +807,6 @@ mean_iou
.. autofunction:: paddle.fluid.layers.mean_iou
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_mean_iou`
-
.. _api_fluid_layers_merge_selected_rows:
merge_selected_rows
@@ -1011,8 +815,6 @@ merge_selected_rows
.. autofunction:: paddle.fluid.layers.merge_selected_rows
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_merge_selected_rows`
-
.. _api_fluid_layers_mul:
mul
@@ -1021,8 +823,6 @@ mul
.. autofunction:: paddle.fluid.layers.mul
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_mul`
-
.. _api_fluid_layers_multiplex:
multiplex
@@ -1031,8 +831,6 @@ multiplex
.. autofunction:: paddle.fluid.layers.multiplex
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_multiplex`
-
.. _api_fluid_layers_nce:
nce
@@ -1041,8 +839,6 @@ nce
.. autofunction:: paddle.fluid.layers.nce
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_nce`
-
.. _api_fluid_layers_one_hot:
one_hot
@@ -1051,8 +847,6 @@ one_hot
.. autofunction:: paddle.fluid.layers.one_hot
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_one_hot`
-
.. _api_fluid_layers_pad:
pad
@@ -1061,8 +855,6 @@ pad
.. autofunction:: paddle.fluid.layers.pad
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_pad`
-
.. _api_fluid_layers_pad2d:
pad2d
@@ -1071,8 +863,6 @@ pad2d
.. autofunction:: paddle.fluid.layers.pad2d
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_pad2d`
-
.. _api_fluid_layers_pad_constant_like:
pad_constant_like
@@ -1081,8 +871,6 @@ pad_constant_like
.. autofunction:: paddle.fluid.layers.pad_constant_like
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_pad_constant_like`
-
.. _api_fluid_layers_pool2d:
pool2d
@@ -1091,8 +879,6 @@ pool2d
.. autofunction:: paddle.fluid.layers.pool2d
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_pool2d`
-
.. _api_fluid_layers_pool3d:
pool3d
@@ -1101,8 +887,6 @@ pool3d
.. autofunction:: paddle.fluid.layers.pool3d
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_pool3d`
-
.. _api_fluid_layers_pow:
pow
@@ -1111,8 +895,6 @@ pow
.. autofunction:: paddle.fluid.layers.pow
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_pow`
-
.. _api_fluid_layers_prelu:
prelu
@@ -1121,8 +903,6 @@ prelu
.. autofunction:: paddle.fluid.layers.prelu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_prelu`
-
.. _api_fluid_layers_random_crop:
random_crop
@@ -1131,8 +911,6 @@ random_crop
.. autofunction:: paddle.fluid.layers.random_crop
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_random_crop`
-
.. _api_fluid_layers_rank_loss:
rank_loss
@@ -1141,8 +919,6 @@ rank_loss
.. autofunction:: paddle.fluid.layers.rank_loss
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_rank_loss`
-
.. _api_fluid_layers_reduce_max:
reduce_max
@@ -1151,8 +927,6 @@ reduce_max
.. autofunction:: paddle.fluid.layers.reduce_max
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reduce_max`
-
.. _api_fluid_layers_reduce_mean:
reduce_mean
@@ -1161,8 +935,6 @@ reduce_mean
.. autofunction:: paddle.fluid.layers.reduce_mean
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reduce_mean`
-
.. _api_fluid_layers_reduce_min:
reduce_min
@@ -1171,8 +943,6 @@ reduce_min
.. autofunction:: paddle.fluid.layers.reduce_min
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reduce_min`
-
.. _api_fluid_layers_reduce_prod:
reduce_prod
@@ -1181,8 +951,6 @@ reduce_prod
.. autofunction:: paddle.fluid.layers.reduce_prod
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reduce_prod`
-
.. _api_fluid_layers_reduce_sum:
reduce_sum
@@ -1191,8 +959,6 @@ reduce_sum
.. autofunction:: paddle.fluid.layers.reduce_sum
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reduce_sum`
-
.. _api_fluid_layers_relu:
relu
@@ -1201,8 +967,6 @@ relu
.. autofunction:: paddle.fluid.layers.relu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_relu`
-
.. _api_fluid_layers_relu6:
relu6
@@ -1211,8 +975,6 @@ relu6
.. autofunction:: paddle.fluid.layers.relu6
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_relu6`
-
.. _api_fluid_layers_reshape:
reshape
@@ -1221,8 +983,6 @@ reshape
.. autofunction:: paddle.fluid.layers.reshape
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reshape`
-
.. _api_fluid_layers_resize_bilinear:
resize_bilinear
@@ -1231,8 +991,6 @@ resize_bilinear
.. autofunction:: paddle.fluid.layers.resize_bilinear
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_resize_bilinear`
-
.. _api_fluid_layers_resize_nearest:
resize_nearest
@@ -1241,8 +999,6 @@ resize_nearest
.. autofunction:: paddle.fluid.layers.resize_nearest
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_resize_nearest`
-
.. _api_fluid_layers_roi_align:
roi_align
@@ -1251,8 +1007,6 @@ roi_align
.. autofunction:: paddle.fluid.layers.roi_align
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_roi_align`
-
.. _api_fluid_layers_roi_pool:
roi_pool
@@ -1261,8 +1015,6 @@ roi_pool
.. autofunction:: paddle.fluid.layers.roi_pool
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_roi_pool`
-
.. _api_fluid_layers_row_conv:
row_conv
@@ -1271,8 +1023,6 @@ row_conv
.. autofunction:: paddle.fluid.layers.row_conv
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_row_conv`
-
.. _api_fluid_layers_sampling_id:
sampling_id
@@ -1281,8 +1031,6 @@ sampling_id
.. autofunction:: paddle.fluid.layers.sampling_id
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sampling_id`
-
.. _api_fluid_layers_scale:
scale
@@ -1291,8 +1039,6 @@ scale
.. autofunction:: paddle.fluid.layers.scale
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_scale`
-
.. _api_fluid_layers_scatter:
scatter
@@ -1301,8 +1047,6 @@ scatter
.. autofunction:: paddle.fluid.layers.scatter
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_scatter`
-
.. _api_fluid_layers_selu:
selu
@@ -1311,8 +1055,6 @@ selu
.. autofunction:: paddle.fluid.layers.selu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_selu`
-
.. _api_fluid_layers_sequence_concat:
sequence_concat
@@ -1321,8 +1063,6 @@ sequence_concat
.. autofunction:: paddle.fluid.layers.sequence_concat
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_concat`
-
.. _api_fluid_layers_sequence_conv:
sequence_conv
@@ -1331,8 +1071,6 @@ sequence_conv
.. autofunction:: paddle.fluid.layers.sequence_conv
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_conv`
-
.. _api_fluid_layers_sequence_enumerate:
sequence_enumerate
@@ -1341,8 +1079,6 @@ sequence_enumerate
.. autofunction:: paddle.fluid.layers.sequence_enumerate
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_enumerate`
-
.. _api_fluid_layers_sequence_expand:
sequence_expand
@@ -1351,8 +1087,6 @@ sequence_expand
.. autofunction:: paddle.fluid.layers.sequence_expand
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_expand`
-
.. _api_fluid_layers_sequence_expand_as:
sequence_expand_as
@@ -1361,8 +1095,6 @@ sequence_expand_as
.. autofunction:: paddle.fluid.layers.sequence_expand_as
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_expand_as`
-
.. _api_fluid_layers_sequence_first_step:
sequence_first_step
@@ -1371,8 +1103,6 @@ sequence_first_step
.. autofunction:: paddle.fluid.layers.sequence_first_step
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_first_step`
-
.. _api_fluid_layers_sequence_last_step:
sequence_last_step
@@ -1381,8 +1111,6 @@ sequence_last_step
.. autofunction:: paddle.fluid.layers.sequence_last_step
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_last_step`
-
.. _api_fluid_layers_sequence_mask:
sequence_mask
@@ -1391,8 +1119,6 @@ sequence_mask
.. autofunction:: paddle.fluid.layers.sequence_mask
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_mask`
-
.. _api_fluid_layers_sequence_pad:
sequence_pad
@@ -1401,8 +1127,6 @@ sequence_pad
.. autofunction:: paddle.fluid.layers.sequence_pad
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_pad`
-
.. _api_fluid_layers_sequence_pool:
sequence_pool
@@ -1411,8 +1135,6 @@ sequence_pool
.. autofunction:: paddle.fluid.layers.sequence_pool
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_pool`
-
.. _api_fluid_layers_sequence_reshape:
sequence_reshape
@@ -1421,8 +1143,6 @@ sequence_reshape
.. autofunction:: paddle.fluid.layers.sequence_reshape
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_reshape`
-
.. _api_fluid_layers_sequence_reverse:
sequence_reverse
@@ -1431,8 +1151,6 @@ sequence_reverse
.. autofunction:: paddle.fluid.layers.sequence_reverse
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_reverse`
-
.. _api_fluid_layers_sequence_scatter:
sequence_scatter
@@ -1441,8 +1159,6 @@ sequence_scatter
.. autofunction:: paddle.fluid.layers.sequence_scatter
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_scatter`
-
.. _api_fluid_layers_sequence_slice:
sequence_slice
@@ -1451,8 +1167,6 @@ sequence_slice
.. autofunction:: paddle.fluid.layers.sequence_slice
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_slice`
-
.. _api_fluid_layers_sequence_softmax:
sequence_softmax
@@ -1461,8 +1175,6 @@ sequence_softmax
.. autofunction:: paddle.fluid.layers.sequence_softmax
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_softmax`
-
.. _api_fluid_layers_sequence_unpad:
sequence_unpad
@@ -1471,8 +1183,6 @@ sequence_unpad
.. autofunction:: paddle.fluid.layers.sequence_unpad
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sequence_unpad`
-
.. _api_fluid_layers_shape:
shape
@@ -1481,8 +1191,6 @@ shape
.. autofunction:: paddle.fluid.layers.shape
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_shape`
-
.. _api_fluid_layers_sigmoid_cross_entropy_with_logits:
sigmoid_cross_entropy_with_logits
@@ -1491,8 +1199,6 @@ sigmoid_cross_entropy_with_logits
.. autofunction:: paddle.fluid.layers.sigmoid_cross_entropy_with_logits
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sigmoid_cross_entropy_with_logits`
-
.. _api_fluid_layers_similarity_focus:
similarity_focus
@@ -1501,8 +1207,6 @@ similarity_focus
.. autofunction:: paddle.fluid.layers.similarity_focus
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_similarity_focus`
-
.. _api_fluid_layers_slice:
slice
@@ -1511,8 +1215,6 @@ slice
.. autofunction:: paddle.fluid.layers.slice
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_slice`
-
.. _api_fluid_layers_smooth_l1:
smooth_l1
@@ -1521,8 +1223,6 @@ smooth_l1
.. autofunction:: paddle.fluid.layers.smooth_l1
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_smooth_l1`
-
.. _api_fluid_layers_soft_relu:
soft_relu
@@ -1531,8 +1231,6 @@ soft_relu
.. autofunction:: paddle.fluid.layers.soft_relu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_soft_relu`
-
.. _api_fluid_layers_softmax:
softmax
@@ -1541,8 +1239,6 @@ softmax
.. autofunction:: paddle.fluid.layers.softmax
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_softmax`
-
.. _api_fluid_layers_softmax_with_cross_entropy:
softmax_with_cross_entropy
@@ -1551,8 +1247,6 @@ softmax_with_cross_entropy
.. autofunction:: paddle.fluid.layers.softmax_with_cross_entropy
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_softmax_with_cross_entropy`
-
.. _api_fluid_layers_space_to_depth:
space_to_depth
@@ -1561,8 +1255,6 @@ space_to_depth
.. autofunction:: paddle.fluid.layers.space_to_depth
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_space_to_depth`
-
.. _api_fluid_layers_split:
split
@@ -1571,8 +1263,6 @@ split
.. autofunction:: paddle.fluid.layers.split
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_split`
-
.. _api_fluid_layers_square_error_cost:
square_error_cost
@@ -1581,8 +1271,6 @@ square_error_cost
.. autofunction:: paddle.fluid.layers.square_error_cost
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_square_error_cost`
-
.. _api_fluid_layers_squeeze:
squeeze
@@ -1591,8 +1279,6 @@ squeeze
.. autofunction:: paddle.fluid.layers.squeeze
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_squeeze`
-
.. _api_fluid_layers_stack:
stack
@@ -1601,8 +1287,6 @@ stack
.. autofunction:: paddle.fluid.layers.stack
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_stack`
-
.. _api_fluid_layers_stanh:
stanh
@@ -1611,8 +1295,6 @@ stanh
.. autofunction:: paddle.fluid.layers.stanh
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_stanh`
-
.. _api_fluid_layers_sum:
sum
@@ -1621,8 +1303,6 @@ sum
.. autofunction:: paddle.fluid.layers.sum
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sum`
-
.. _api_fluid_layers_swish:
swish
@@ -1631,8 +1311,6 @@ swish
.. autofunction:: paddle.fluid.layers.swish
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_swish`
-
.. _api_fluid_layers_topk:
topk
@@ -1641,8 +1319,6 @@ topk
.. autofunction:: paddle.fluid.layers.topk
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_topk`
-
.. _api_fluid_layers_transpose:
transpose
@@ -1651,8 +1327,6 @@ transpose
.. autofunction:: paddle.fluid.layers.transpose
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_transpose`
-
.. _api_fluid_layers_uniform_random_batch_size_like:
uniform_random_batch_size_like
@@ -1661,8 +1335,6 @@ uniform_random_batch_size_like
.. autofunction:: paddle.fluid.layers.uniform_random_batch_size_like
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_uniform_random_batch_size_like`
-
.. _api_fluid_layers_unsqueeze:
unsqueeze
@@ -1671,8 +1343,6 @@ unsqueeze
.. autofunction:: paddle.fluid.layers.unsqueeze
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_unsqueeze`
-
.. _api_fluid_layers_unstack:
unstack
@@ -1681,8 +1351,6 @@ unstack
.. autofunction:: paddle.fluid.layers.unstack
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_unstack`
-
.. _api_fluid_layers_warpctc:
warpctc
@@ -1691,8 +1359,6 @@ warpctc
.. autofunction:: paddle.fluid.layers.warpctc
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_warpctc`
-
ops
===
@@ -1704,8 +1370,6 @@ abs
.. autofunction:: paddle.fluid.layers.abs
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_abs`
-
.. _api_fluid_layers_ceil:
ceil
@@ -1714,8 +1378,6 @@ ceil
.. autofunction:: paddle.fluid.layers.ceil
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_ceil`
-
.. _api_fluid_layers_cos:
cos
@@ -1724,8 +1386,6 @@ cos
.. autofunction:: paddle.fluid.layers.cos
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_cos`
-
.. _api_fluid_layers_cumsum:
cumsum
@@ -1734,8 +1394,6 @@ cumsum
.. autofunction:: paddle.fluid.layers.cumsum
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_cumsum`
-
.. _api_fluid_layers_exp:
exp
@@ -1744,8 +1402,6 @@ exp
.. autofunction:: paddle.fluid.layers.exp
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_exp`
-
.. _api_fluid_layers_floor:
floor
@@ -1754,8 +1410,6 @@ floor
.. autofunction:: paddle.fluid.layers.floor
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_floor`
-
.. _api_fluid_layers_hard_shrink:
hard_shrink
@@ -1764,8 +1418,6 @@ hard_shrink
.. autofunction:: paddle.fluid.layers.hard_shrink
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_hard_shrink`
-
.. _api_fluid_layers_logsigmoid:
logsigmoid
@@ -1774,8 +1426,6 @@ logsigmoid
.. autofunction:: paddle.fluid.layers.logsigmoid
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_logsigmoid`
-
.. _api_fluid_layers_reciprocal:
reciprocal
@@ -1784,8 +1434,6 @@ reciprocal
.. autofunction:: paddle.fluid.layers.reciprocal
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reciprocal`
-
.. _api_fluid_layers_round:
round
@@ -1794,8 +1442,6 @@ round
.. autofunction:: paddle.fluid.layers.round
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_round`
-
.. _api_fluid_layers_sigmoid:
sigmoid
@@ -1804,8 +1450,6 @@ sigmoid
.. autofunction:: paddle.fluid.layers.sigmoid
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sigmoid`
-
.. _api_fluid_layers_sin:
sin
@@ -1814,8 +1458,6 @@ sin
.. autofunction:: paddle.fluid.layers.sin
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sin`
-
.. _api_fluid_layers_softplus:
softplus
@@ -1824,8 +1466,6 @@ softplus
.. autofunction:: paddle.fluid.layers.softplus
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_softplus`
-
.. _api_fluid_layers_softshrink:
softshrink
@@ -1834,8 +1474,6 @@ softshrink
.. autofunction:: paddle.fluid.layers.softshrink
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_softshrink`
-
.. _api_fluid_layers_softsign:
softsign
@@ -1844,8 +1482,6 @@ softsign
.. autofunction:: paddle.fluid.layers.softsign
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_softsign`
-
.. _api_fluid_layers_sqrt:
sqrt
@@ -1854,8 +1490,6 @@ sqrt
.. autofunction:: paddle.fluid.layers.sqrt
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sqrt`
-
.. _api_fluid_layers_square:
square
@@ -1864,8 +1498,6 @@ square
.. autofunction:: paddle.fluid.layers.square
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_square`
-
.. _api_fluid_layers_tanh:
tanh
@@ -1874,8 +1506,6 @@ tanh
.. autofunction:: paddle.fluid.layers.tanh
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_tanh`
-
.. _api_fluid_layers_tanh_shrink:
tanh_shrink
@@ -1884,8 +1514,6 @@ tanh_shrink
.. autofunction:: paddle.fluid.layers.tanh_shrink
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_tanh_shrink`
-
.. _api_fluid_layers_thresholded_relu:
thresholded_relu
@@ -1894,8 +1522,6 @@ thresholded_relu
.. autofunction:: paddle.fluid.layers.thresholded_relu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_thresholded_relu`
-
.. _api_fluid_layers_uniform_random:
uniform_random
@@ -1904,8 +1530,6 @@ uniform_random
.. autofunction:: paddle.fluid.layers.uniform_random
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_uniform_random`
-
tensor
======
@@ -1917,8 +1541,6 @@ argmax
.. autofunction:: paddle.fluid.layers.argmax
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_argmax`
-
.. _api_fluid_layers_argmin:
argmin
@@ -1927,8 +1549,6 @@ argmin
.. autofunction:: paddle.fluid.layers.argmin
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_argmin`
-
.. _api_fluid_layers_argsort:
argsort
@@ -1937,8 +1557,6 @@ argsort
.. autofunction:: paddle.fluid.layers.argsort
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_argsort`
-
.. _api_fluid_layers_assign:
assign
@@ -1947,8 +1565,6 @@ assign
.. autofunction:: paddle.fluid.layers.assign
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_assign`
-
.. _api_fluid_layers_cast:
cast
@@ -1957,8 +1573,6 @@ cast
.. autofunction:: paddle.fluid.layers.cast
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_cast`
-
.. _api_fluid_layers_concat:
concat
@@ -1967,8 +1581,6 @@ concat
.. autofunction:: paddle.fluid.layers.concat
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_concat`
-
.. _api_fluid_layers_create_global_var:
create_global_var
@@ -1977,8 +1589,6 @@ create_global_var
.. autofunction:: paddle.fluid.layers.create_global_var
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_create_global_var`
-
.. _api_fluid_layers_create_parameter:
create_parameter
@@ -1987,8 +1597,6 @@ create_parameter
.. autofunction:: paddle.fluid.layers.create_parameter
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_create_parameter`
-
.. _api_fluid_layers_create_tensor:
create_tensor
@@ -1997,8 +1605,6 @@ create_tensor
.. autofunction:: paddle.fluid.layers.create_tensor
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_create_tensor`
-
.. _api_fluid_layers_fill_constant:
fill_constant
@@ -2007,8 +1613,6 @@ fill_constant
.. autofunction:: paddle.fluid.layers.fill_constant
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_fill_constant`
-
.. _api_fluid_layers_fill_constant_batch_size_like:
fill_constant_batch_size_like
@@ -2017,8 +1621,6 @@ fill_constant_batch_size_like
.. autofunction:: paddle.fluid.layers.fill_constant_batch_size_like
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_fill_constant_batch_size_like`
-
.. _api_fluid_layers_has_inf:
has_inf
@@ -2027,8 +1629,6 @@ has_inf
.. autofunction:: paddle.fluid.layers.has_inf
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_has_inf`
-
.. _api_fluid_layers_has_nan:
has_nan
@@ -2037,8 +1637,6 @@ has_nan
.. autofunction:: paddle.fluid.layers.has_nan
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_has_nan`
-
.. _api_fluid_layers_isfinite:
isfinite
@@ -2047,8 +1645,6 @@ isfinite
.. autofunction:: paddle.fluid.layers.isfinite
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_isfinite`
-
.. _api_fluid_layers_ones:
ones
@@ -2057,8 +1653,6 @@ ones
.. autofunction:: paddle.fluid.layers.ones
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_ones`
-
.. _api_fluid_layers_reverse:
reverse
@@ -2067,8 +1661,6 @@ reverse
.. autofunction:: paddle.fluid.layers.reverse
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_reverse`
-
.. _api_fluid_layers_sums:
sums
@@ -2077,8 +1669,6 @@ sums
.. autofunction:: paddle.fluid.layers.sums
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_sums`
-
.. _api_fluid_layers_tensor_array_to_tensor:
tensor_array_to_tensor
@@ -2087,8 +1677,6 @@ tensor_array_to_tensor
.. autofunction:: paddle.fluid.layers.tensor_array_to_tensor
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_tensor_array_to_tensor`
-
.. _api_fluid_layers_zeros:
zeros
@@ -2097,8 +1685,6 @@ zeros
.. autofunction:: paddle.fluid.layers.zeros
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_zeros`
-
learning_rate_scheduler
=======================
@@ -2110,8 +1696,6 @@ append_LARS
.. autofunction:: paddle.fluid.layers.append_LARS
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_append_LARS`
-
.. _api_fluid_layers_exponential_decay:
exponential_decay
@@ -2120,8 +1704,6 @@ exponential_decay
.. autofunction:: paddle.fluid.layers.exponential_decay
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_exponential_decay`
-
.. _api_fluid_layers_inverse_time_decay:
inverse_time_decay
@@ -2130,8 +1712,6 @@ inverse_time_decay
.. autofunction:: paddle.fluid.layers.inverse_time_decay
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_inverse_time_decay`
-
.. _api_fluid_layers_natural_exp_decay:
natural_exp_decay
@@ -2140,8 +1720,6 @@ natural_exp_decay
.. autofunction:: paddle.fluid.layers.natural_exp_decay
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_natural_exp_decay`
-
.. _api_fluid_layers_noam_decay:
noam_decay
@@ -2150,8 +1728,6 @@ noam_decay
.. autofunction:: paddle.fluid.layers.noam_decay
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_noam_decay`
-
.. _api_fluid_layers_piecewise_decay:
piecewise_decay
@@ -2160,8 +1736,6 @@ piecewise_decay
.. autofunction:: paddle.fluid.layers.piecewise_decay
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_piecewise_decay`
-
.. _api_fluid_layers_polynomial_decay:
polynomial_decay
@@ -2170,8 +1744,6 @@ polynomial_decay
.. autofunction:: paddle.fluid.layers.polynomial_decay
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_polynomial_decay`
-
detection
=========
@@ -2183,8 +1755,6 @@ anchor_generator
.. autofunction:: paddle.fluid.layers.anchor_generator
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_anchor_generator`
-
.. _api_fluid_layers_bipartite_match:
bipartite_match
@@ -2193,8 +1763,6 @@ bipartite_match
.. autofunction:: paddle.fluid.layers.bipartite_match
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_bipartite_match`
-
.. _api_fluid_layers_box_coder:
box_coder
@@ -2203,8 +1771,6 @@ box_coder
.. autofunction:: paddle.fluid.layers.box_coder
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_box_coder`
-
.. _api_fluid_layers_density_prior_box:
density_prior_box
@@ -2213,8 +1779,6 @@ density_prior_box
.. autofunction:: paddle.fluid.layers.density_prior_box
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_density_prior_box`
-
.. _api_fluid_layers_detection_map:
detection_map
@@ -2223,8 +1787,6 @@ detection_map
.. autofunction:: paddle.fluid.layers.detection_map
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_detection_map`
-
.. _api_fluid_layers_detection_output:
detection_output
@@ -2233,8 +1795,6 @@ detection_output
.. autofunction:: paddle.fluid.layers.detection_output
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_detection_output`
-
.. _api_fluid_layers_generate_proposal_labels:
generate_proposal_labels
@@ -2243,8 +1803,6 @@ generate_proposal_labels
.. autofunction:: paddle.fluid.layers.generate_proposal_labels
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_generate_proposal_labels`
-
.. _api_fluid_layers_generate_proposals:
generate_proposals
@@ -2253,8 +1811,6 @@ generate_proposals
.. autofunction:: paddle.fluid.layers.generate_proposals
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_generate_proposals`
-
.. _api_fluid_layers_iou_similarity:
iou_similarity
@@ -2263,8 +1819,6 @@ iou_similarity
.. autofunction:: paddle.fluid.layers.iou_similarity
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_iou_similarity`
-
.. _api_fluid_layers_multi_box_head:
multi_box_head
@@ -2273,8 +1827,6 @@ multi_box_head
.. autofunction:: paddle.fluid.layers.multi_box_head
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_multi_box_head`
-
.. _api_fluid_layers_polygon_box_transform:
polygon_box_transform
@@ -2283,8 +1835,6 @@ polygon_box_transform
.. autofunction:: paddle.fluid.layers.polygon_box_transform
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_polygon_box_transform`
-
.. _api_fluid_layers_prior_box:
prior_box
@@ -2293,8 +1843,6 @@ prior_box
.. autofunction:: paddle.fluid.layers.prior_box
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_prior_box`
-
.. _api_fluid_layers_roi_perspective_transform:
roi_perspective_transform
@@ -2303,8 +1851,6 @@ roi_perspective_transform
.. autofunction:: paddle.fluid.layers.roi_perspective_transform
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_roi_perspective_transform`
-
.. _api_fluid_layers_rpn_target_assign:
rpn_target_assign
@@ -2313,8 +1859,6 @@ rpn_target_assign
.. autofunction:: paddle.fluid.layers.rpn_target_assign
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_rpn_target_assign`
-
.. _api_fluid_layers_ssd_loss:
ssd_loss
@@ -2323,8 +1867,6 @@ ssd_loss
.. autofunction:: paddle.fluid.layers.ssd_loss
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_ssd_loss`
-
.. _api_fluid_layers_target_assign:
target_assign
@@ -2333,8 +1875,6 @@ target_assign
.. autofunction:: paddle.fluid.layers.target_assign
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_target_assign`
-
metric_op
=========
@@ -2346,8 +1886,6 @@ accuracy
.. autofunction:: paddle.fluid.layers.accuracy
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_accuracy`
-
.. _api_fluid_layers_auc:
auc
@@ -2356,5 +1894,3 @@ auc
.. autofunction:: paddle.fluid.layers.auc
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_layers_auc`
-
diff --git a/doc/fluid/api/metrics.rst b/doc/fluid/api/metrics.rst
index 8d0a603475ffbb8ffd123c3320afb0173bfefff1..5b5f7bc3b4155d4d859573234df722e098365099 100644
--- a/doc/fluid/api/metrics.rst
+++ b/doc/fluid/api/metrics.rst
@@ -14,8 +14,6 @@ Accuracy
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_Accuracy`
-
.. _api_fluid_metrics_Auc:
Auc
@@ -25,8 +23,6 @@ Auc
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_Auc`
-
.. _api_fluid_metrics_ChunkEvaluator:
ChunkEvaluator
@@ -36,8 +32,6 @@ ChunkEvaluator
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_ChunkEvaluator`
-
.. _api_fluid_metrics_CompositeMetric:
CompositeMetric
@@ -47,8 +41,6 @@ CompositeMetric
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_CompositeMetric`
-
.. _api_fluid_metrics_DetectionMAP:
DetectionMAP
@@ -58,8 +50,6 @@ DetectionMAP
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_DetectionMAP`
-
.. _api_fluid_metrics_EditDistance:
EditDistance
@@ -69,8 +59,6 @@ EditDistance
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_EditDistance`
-
.. _api_fluid_metrics_MetricBase:
MetricBase
@@ -80,8 +68,6 @@ MetricBase
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_MetricBase`
-
.. _api_fluid_metrics_Precision:
Precision
@@ -91,8 +77,6 @@ Precision
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_Precision`
-
.. _api_fluid_metrics_Recall:
Recall
@@ -102,5 +86,3 @@ Recall
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_metrics_Recall`
-
diff --git a/doc/fluid/api/nets.rst b/doc/fluid/api/nets.rst
index 4e0dcabee3b7d6ef067c36f076a164efcaaa4673..f3792e62946968e5438f928e3fe50e5b188fc274 100644
--- a/doc/fluid/api/nets.rst
+++ b/doc/fluid/api/nets.rst
@@ -13,8 +13,6 @@ glu
.. autofunction:: paddle.fluid.nets.glu
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_nets_glu`
-
.. _api_fluid_nets_img_conv_group:
img_conv_group
@@ -23,8 +21,6 @@ img_conv_group
.. autofunction:: paddle.fluid.nets.img_conv_group
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_nets_img_conv_group`
-
.. _api_fluid_nets_scaled_dot_product_attention:
scaled_dot_product_attention
@@ -33,8 +29,6 @@ scaled_dot_product_attention
.. autofunction:: paddle.fluid.nets.scaled_dot_product_attention
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_nets_scaled_dot_product_attention`
-
.. _api_fluid_nets_sequence_conv_pool:
sequence_conv_pool
@@ -43,8 +37,6 @@ sequence_conv_pool
.. autofunction:: paddle.fluid.nets.sequence_conv_pool
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_nets_sequence_conv_pool`
-
.. _api_fluid_nets_simple_img_conv_pool:
simple_img_conv_pool
@@ -53,5 +45,3 @@ simple_img_conv_pool
.. autofunction:: paddle.fluid.nets.simple_img_conv_pool
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_nets_simple_img_conv_pool`
-
diff --git a/doc/fluid/api/optimizer.rst b/doc/fluid/api/optimizer.rst
index 6fb2140ece1ed2fab2b0994fe4119246b3e4bf29..6c81c501dc03d12e32a8a0fd5312785a95f18ac4 100644
--- a/doc/fluid/api/optimizer.rst
+++ b/doc/fluid/api/optimizer.rst
@@ -14,8 +14,6 @@ Adadelta
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_Adadelta`
-
.. _api_fluid_optimizer_Adagrad:
Adagrad
@@ -25,8 +23,6 @@ Adagrad
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_Adagrad`
-
.. _api_fluid_optimizer_AdagradOptimizer:
AdagradOptimizer
@@ -36,8 +32,6 @@ AdagradOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_AdagradOptimizer`
-
.. _api_fluid_optimizer_Adam:
Adam
@@ -47,8 +41,6 @@ Adam
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_Adam`
-
.. _api_fluid_optimizer_Adamax:
Adamax
@@ -58,8 +50,6 @@ Adamax
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_Adamax`
-
.. _api_fluid_optimizer_AdamaxOptimizer:
AdamaxOptimizer
@@ -69,8 +59,6 @@ AdamaxOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_AdamaxOptimizer`
-
.. _api_fluid_optimizer_AdamOptimizer:
AdamOptimizer
@@ -80,8 +68,6 @@ AdamOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_AdamOptimizer`
-
.. _api_fluid_optimizer_DecayedAdagrad:
DecayedAdagrad
@@ -91,8 +77,6 @@ DecayedAdagrad
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_DecayedAdagrad`
-
.. _api_fluid_optimizer_DecayedAdagradOptimizer:
DecayedAdagradOptimizer
@@ -102,8 +86,6 @@ DecayedAdagradOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_DecayedAdagradOptimizer`
-
.. _api_fluid_optimizer_Ftrl:
Ftrl
@@ -113,8 +95,6 @@ Ftrl
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_Ftrl`
-
.. _api_fluid_optimizer_FtrlOptimizer:
FtrlOptimizer
@@ -124,8 +104,6 @@ FtrlOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_FtrlOptimizer`
-
.. _api_fluid_optimizer_LarsMomentum:
LarsMomentum
@@ -135,8 +113,6 @@ LarsMomentum
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_LarsMomentum`
-
.. _api_fluid_optimizer_LarsMomentumOptimizer:
LarsMomentumOptimizer
@@ -146,8 +122,6 @@ LarsMomentumOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_LarsMomentumOptimizer`
-
.. _api_fluid_optimizer_ModelAverage:
ModelAverage
@@ -157,8 +131,6 @@ ModelAverage
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_ModelAverage`
-
.. _api_fluid_optimizer_Momentum:
Momentum
@@ -168,8 +140,6 @@ Momentum
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_Momentum`
-
.. _api_fluid_optimizer_MomentumOptimizer:
MomentumOptimizer
@@ -179,8 +149,6 @@ MomentumOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_MomentumOptimizer`
-
.. _api_fluid_optimizer_RMSPropOptimizer:
RMSPropOptimizer
@@ -190,8 +158,6 @@ RMSPropOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_RMSPropOptimizer`
-
.. _api_fluid_optimizer_SGD:
SGD
@@ -201,8 +167,6 @@ SGD
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_SGD`
-
.. _api_fluid_optimizer_SGDOptimizer:
SGDOptimizer
@@ -212,5 +176,3 @@ SGDOptimizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_optimizer_SGDOptimizer`
-
diff --git a/doc/fluid/api/profiler.rst b/doc/fluid/api/profiler.rst
index 19feb25bf760b52f18387385468eacc6580e51d6..cff8e8c2428f8a75b0f145605c8eec536fefc58e 100644
--- a/doc/fluid/api/profiler.rst
+++ b/doc/fluid/api/profiler.rst
@@ -13,8 +13,6 @@ cuda_profiler
.. autofunction:: paddle.fluid.profiler.cuda_profiler
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_profiler_cuda_profiler`
-
.. _api_fluid_profiler_profiler:
profiler
@@ -23,8 +21,6 @@ profiler
.. autofunction:: paddle.fluid.profiler.profiler
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_profiler_profiler`
-
.. _api_fluid_profiler_reset_profiler:
reset_profiler
@@ -33,8 +29,6 @@ reset_profiler
.. autofunction:: paddle.fluid.profiler.reset_profiler
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_profiler_reset_profiler`
-
.. _api_fluid_profiler_start_profiler:
start_profiler
@@ -43,8 +37,6 @@ start_profiler
.. autofunction:: paddle.fluid.profiler.start_profiler
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_profiler_start_profiler`
-
.. _api_fluid_profiler_stop_profiler:
stop_profiler
@@ -53,5 +45,3 @@ stop_profiler
.. autofunction:: paddle.fluid.profiler.stop_profiler
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_profiler_stop_profiler`
-
diff --git a/doc/fluid/api/recordio_writer.rst b/doc/fluid/api/recordio_writer.rst
index 9d7848f40691245c3123e4fd8ab440ce4e9747a9..f0c12fd115478a29fbd178b533b7490b2f663717 100644
--- a/doc/fluid/api/recordio_writer.rst
+++ b/doc/fluid/api/recordio_writer.rst
@@ -13,8 +13,6 @@ convert_reader_to_recordio_file
.. autofunction:: paddle.fluid.recordio_writer.convert_reader_to_recordio_file
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_recordio_writer_convert_reader_to_recordio_file`
-
.. _api_fluid_recordio_writer_convert_reader_to_recordio_files:
convert_reader_to_recordio_files
@@ -23,5 +21,3 @@ convert_reader_to_recordio_files
.. autofunction:: paddle.fluid.recordio_writer.convert_reader_to_recordio_files
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_recordio_writer_convert_reader_to_recordio_files`
-
diff --git a/doc/fluid/api/regularizer.rst b/doc/fluid/api/regularizer.rst
index b505ff506b8e2647c68942edeea0e6dd061486f7..dcf69eba8a8db2e02cfcc04472995376a579ccbe 100644
--- a/doc/fluid/api/regularizer.rst
+++ b/doc/fluid/api/regularizer.rst
@@ -14,8 +14,6 @@ L1Decay
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_regularizer_L1Decay`
-
.. _api_fluid_regularizer_L1DecayRegularizer:
L1DecayRegularizer
@@ -25,8 +23,6 @@ L1DecayRegularizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_regularizer_L1DecayRegularizer`
-
.. _api_fluid_regularizer_L2Decay:
L2Decay
@@ -36,8 +32,6 @@ L2Decay
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_regularizer_L2Decay`
-
.. _api_fluid_regularizer_L2DecayRegularizer:
L2DecayRegularizer
@@ -47,5 +41,3 @@ L2DecayRegularizer
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_regularizer_L2DecayRegularizer`
-
diff --git a/doc/fluid/api/transpiler.rst b/doc/fluid/api/transpiler.rst
index e647933278fb21fc619a774889fb58bd854dbb17..7764f60deda2fac9b9c0e65e03dc7a3bf0f2f439 100644
--- a/doc/fluid/api/transpiler.rst
+++ b/doc/fluid/api/transpiler.rst
@@ -14,8 +14,6 @@ DistributeTranspiler
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_transpiler_DistributeTranspiler`
-
.. _api_fluid_transpiler_DistributeTranspilerConfig:
DistributeTranspilerConfig
@@ -25,8 +23,6 @@ DistributeTranspilerConfig
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_transpiler_DistributeTranspilerConfig`
-
.. _api_fluid_transpiler_HashName:
HashName
@@ -36,8 +32,6 @@ HashName
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_transpiler_HashName`
-
.. _api_fluid_transpiler_memory_optimize:
memory_optimize
@@ -46,8 +40,6 @@ memory_optimize
.. autofunction:: paddle.fluid.transpiler.memory_optimize
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_transpiler_memory_optimize`
-
.. _api_fluid_transpiler_release_memory:
release_memory
@@ -56,8 +48,6 @@ release_memory
.. autofunction:: paddle.fluid.transpiler.release_memory
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_transpiler_release_memory`
-
.. _api_fluid_transpiler_RoundRobin:
RoundRobin
@@ -67,5 +57,3 @@ RoundRobin
:members:
:noindex:
-Read Chinese Version: :ref:`cn_api_fluid_transpiler_RoundRobin`
-
diff --git a/doc/fluid/api_cn/api_guides/high_low_level_api.md b/doc/fluid/api_cn/api_guides/high_low_level_api.md
index 8ce2695737c45306c9a0944c35b2e865ce380f05..b4483654058308cde9ef6c8a2e3ec4051c298e37 100644
--- a/doc/fluid/api_cn/api_guides/high_low_level_api.md
+++ b/doc/fluid/api_cn/api_guides/high_low_level_api.md
@@ -1,15 +1,14 @@
## High/Low-level API简介
-Paddle目前有2套API接口:
+PaddlePaddle Fluid目前有2套API接口:
- Low-level(底层) API:
- 灵活性强并且已经相对成熟,使用它训练的模型,能直接支持C++预测上线。
- - 提供了大量的模型作为使用示例,包括[Book](https://github.com/PaddlePaddle/book)中的第7和8章,以及[models](https://github.com/PaddlePaddle/models)中的所有章节。
+ - 提供了大量的模型作为使用示例,包括[Book](https://github.com/PaddlePaddle/book)中的全部章节,以及[models](https://github.com/PaddlePaddle/models)中的所有章节。
- 适用人群:对深度学习有一定了解,需要自定义网络进行训练/预测/上线部署的用户。
- High-level(高层)API:
- - 使用简单,[Book](https://github.com/PaddlePaddle/book)中前六章提供了示例。
+ - 使用简单
- 尚未成熟,接口暂时在[paddle.fluid.contrib](https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/fluid/contrib)下面。
- - 适用人群:想通过Book课程进行深度学习基础知识学习的初级用户。
diff --git a/doc/fluid/api_cn/api_guides/index.rst b/doc/fluid/api_cn/api_guides/index.rst
index fbbad453b24a0719951941974ed9df1e27c842dd..465a316cd5f26169734f6d29d63fecf56863c8ac 100755
--- a/doc/fluid/api_cn/api_guides/index.rst
+++ b/doc/fluid/api_cn/api_guides/index.rst
@@ -2,8 +2,10 @@
API使用指南
===========
+API使用指南分功能向您介绍PaddlePaddle Fluid的API体系和用法,帮助您快速了解PaddlePaddle Fluid API的全貌,包括以下几个模块:
+
.. toctree::
- :hidden:
+ :maxdepth: 1
high_low_level_api.md
low_level/layers/index.rst
diff --git a/doc/fluid/api_cn/api_guides/low_level/distributed/cpu_train_best_practice.rst b/doc/fluid/api_cn/api_guides/low_level/distributed/cpu_train_best_practice.rst
index b6b5102636f27141911c232d05317b1f9b8a1bed..cd69a31b658b125eda096391fadf884c110bcb05 100644
--- a/doc/fluid/api_cn/api_guides/low_level/distributed/cpu_train_best_practice.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/distributed/cpu_train_best_practice.rst
@@ -12,7 +12,7 @@
提高CPU使用率主要依赖 :code:`ParallelExecutor`,可以充分利用多个CPU的计算能力来加速计算。
-API详细使用方法参考 :ref:`api_fluid_ParallelExecutor` ,简单实例用法:
+API详细使用方法参考 :ref:`cn_api_fluid_ParallelExecutor` ,简单实例用法:
.. code-block:: python
@@ -46,7 +46,7 @@ API详细使用方法参考 :ref:`api_fluid_ParallelExecutor` ,简单实例用
提高通信速度
==========
-要减少通信数据量,提高通信速度,主要是使用稀疏更新 ,目前支持 `稀疏更新 <../distributed/sparse_update.html>`_ 的主要是 :ref:`api_fluid_layers_embedding` 。
+要减少通信数据量,提高通信速度,主要是使用稀疏更新 ,目前支持 `稀疏更新 <../distributed/sparse_update.html>`_ 的主要是 :ref:`cn_api_fluid_layers_embedding` 。
.. code-block:: python
diff --git a/doc/fluid/api_cn/api_guides/low_level/executor.rst b/doc/fluid/api_cn/api_guides/low_level/executor.rst
index 5617d14c143e17f59042eff2509eda024adefd40..8599a759828dc41db5aa3f6a6106e7d2542926f5 100644
--- a/doc/fluid/api_cn/api_guides/low_level/executor.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/executor.rst
@@ -7,14 +7,14 @@
:code:`Executor` 即 :code:`执行器` 。PaddlePaddle Fluid中有两种执行器可以选择。
:code:`Executor` 实现了一个简易的执行器,所有Operator会被顺序执行。用户可以使用
Python脚本驱动 :code:`Executor` 执行。默认情况下 :code:`Executor` 是单线程的,如果
-想使用数据并行,请参考另一个执行器, :ref:`api_guide_parallel_executor` 。
+想使用数据并行,请参考另一个执行器, :ref:`cn_api_guide_parallel_executor` 。
:code:`Executor` 的代码逻辑非常简单。建议用户在调试过程中,先使用
:code:`Executor` 跑通模型,再切换到多设备计算,甚至多机计算。
-:code:`Executor` 在构造的时候接受一个 :code:`Place`, 它们可以是 :ref:`api_fluid_CPUPlace`
-或 :ref:`api_fluid_CUDAPlace` 。 :code:`Executor` 在执行的时候可以选择执行的
-:ref:`api_guide_low_level_program` 。
+:code:`Executor` 在构造的时候接受一个 :code:`Place`, 它们可以是 :ref:`cn_api_fluid_CPUPlace`
+或 :ref:`cn_api_fluid_CUDAPlace` 。 :code:`Executor` 在执行的时候可以选择执行的
+:ref:`cn_api_guide_low_level_program` 。
简单的使用方法,请参考 `quick_start_fit_a_line `_ , API Reference 请参考
-:ref:`api_fluid_Executor` 。
+:ref:`cn_api_fluid_Executor` 。
diff --git a/doc/fluid/api_cn/api_guides/low_level/inference.rst b/doc/fluid/api_cn/api_guides/low_level/inference.rst
index 2a61fb307534ec5b5bbc4b89219be9fc31961430..d33b0f6a792e0668971b313058f49ca85706bbf6 100644
--- a/doc/fluid/api_cn/api_guides/low_level/inference.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/inference.rst
@@ -4,7 +4,7 @@
预测引擎
#########
-预测引擎提供了存储预测模型 :ref:`api_fluid_io_save_inference_model` 和加载预测模型 :ref:`api_fluid_io_load_inference_model` 两个接口。
+预测引擎提供了存储预测模型 :ref:`cn_api_fluid_io_save_inference_model` 和加载预测模型 :ref:`cn_api_fluid_io_load_inference_model` 两个接口。
预测模型的存储格式
=================
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/activations.rst b/doc/fluid/api_cn/api_guides/low_level/layers/activations.rst
index 615e364d525b483adcdcad89272a06fc5ade70e7..4f193cb6f7e4e6263f4333466c9944774ac15c6d 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/activations.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/activations.rst
@@ -8,7 +8,7 @@
PaddlePaddle Fluid 对大部分的激活函数进行了支持,其中有:
-:ref:`api_fluid_layers_relu`, :ref:`api_fluid_layers_tanh`, :ref:`api_fluid_layers_sigmoid`, :ref:`api_fluid_layers_elu`, :ref:`api_fluid_layers_relu6`, :ref:`api_fluid_layers_pow`, :ref:`api_fluid_layers_stanh`, :ref:`api_fluid_layers_hard_sigmoid`, :ref:`api_fluid_layers_swish`, :ref:`api_fluid_layers_prelu`, :ref:`api_fluid_layers_brelu`, :ref:`api_fluid_layers_leaky_relu`, :ref:`api_fluid_layers_soft_relu`, :ref:`api_fluid_layers_thresholded_relu`, :ref:`api_fluid_layers_maxout`, :ref:`api_fluid_layers_logsigmoid`, :ref:`api_fluid_layers_hard_shrink`, :ref:`api_fluid_layers_softsign`, :ref:`api_fluid_layers_softplus`, :ref:`api_fluid_layers_tanh_shrink`, :ref:`api_fluid_layers_softshrink`, :ref:`api_fluid_layers_exp`。
+:ref:`cn_api_fluid_layers_relu`, :ref:`cn_api_fluid_layers_tanh`, :ref:`cn_api_fluid_layers_sigmoid`, :ref:`cn_api_fluid_layers_elu`, :ref:`cn_api_fluid_layers_relu6`, :ref:`cn_api_fluid_layers_pow`, :ref:`cn_api_fluid_layers_stanh`, :ref:`cn_api_fluid_layers_hard_sigmoid`, :ref:`cn_api_fluid_layers_swish`, :ref:`cn_api_fluid_layers_prelu`, :ref:`cn_api_fluid_layers_brelu`, :ref:`cn_api_fluid_layers_leaky_relu`, :ref:`cn_api_fluid_layers_soft_relu`, :ref:`cn_api_fluid_layers_thresholded_relu`, :ref:`cn_api_fluid_layers_maxout`, :ref:`cn_api_fluid_layers_logsigmoid`, :ref:`cn_api_fluid_layers_hard_shrink`, :ref:`cn_api_fluid_layers_softsign`, :ref:`cn_api_fluid_layers_softplus`, :ref:`cn_api_fluid_layers_tanh_shrink`, :ref:`cn_api_fluid_layers_softshrink`, :ref:`cn_api_fluid_layers_exp`。
**Fluid提供了两种使用激活函数的方式:**
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/control_flow.rst b/doc/fluid/api_cn/api_guides/low_level/layers/control_flow.rst
index c2192b498cb335c29e1e56dedc1c248cada47198..3bb1b424b450f3f637b16920591626d53d4b5a89 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/control_flow.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/control_flow.rst
@@ -9,9 +9,9 @@
IfElse
======
-条件分支,允许对同一个batch的输入,根据给定的条件,分别选择 :code:`true_block` 或 :code:`false_block` 中的逻辑进行执行,执行完成之后再将两个分支的输出合并为同一个输出。通常,条件表达式可由 :ref:`api_fluid_layers_less_than`, :ref:`api_fluid_layers_equal` 等逻辑比较 API 产生。
+条件分支,允许对同一个batch的输入,根据给定的条件,分别选择 :code:`true_block` 或 :code:`false_block` 中的逻辑进行执行,执行完成之后再将两个分支的输出合并为同一个输出。通常,条件表达式可由 :ref:`cn_api_fluid_layers_less_than`, :ref:`cn_api_fluid_layers_equal` 等逻辑比较 API 产生。
-请参考 :ref:`api_fluid_layers_IfElse`
+请参考 :ref:`cn_api_fluid_layers_IfElse`
Switch
@@ -23,31 +23,31 @@ Switch
* 依次检查逐个case,选择第一个满足条件的case执行,完成执行后即退出所属的block;
* 如果所有case均不满足条件,会选择默认的case进行执行。
-请参考 :ref:`api_fluid_layers_Switch`
+请参考 :ref:`cn_api_fluid_layers_Switch`
While
=====
While 循环,当条件判断为真时,循环执行 :code:`While` 控制流所属 :code:`block` 内的逻辑,条件判断为假时退出循环。与之相关的API有
-* :ref:`api_fluid_layers_increment` :累加API,通常用于对循环次数进行计数;
-* :ref:`api_fluid_layers_array_read` :从 :code:`LOD_TENSOR_ARRAY` 中指定的位置读入Variable,进行计算;
-* :ref:`api_fluid_layers_array_write` :将 Variable 写回到 :code:`LOD_TENSOR_ARRAY` 指定的位置,存储计算结果。
+* :ref:`cn_api_fluid_layers_increment` :累加API,通常用于对循环次数进行计数;
+* :ref:`cn_api_fluid_layers_array_read` :从 :code:`LOD_TENSOR_ARRAY` 中指定的位置读入Variable,进行计算;
+* :ref:`cn_api_fluid_layers_array_write` :将 Variable 写回到 :code:`LOD_TENSOR_ARRAY` 指定的位置,存储计算结果。
-请参考 :ref:`api_fluid_layers_While`
+请参考 :ref:`cn_api_fluid_layers_While`
DynamicRNN
==========
即动态RNN,可处理一个batch不等长的序列数据,其接受 :code:`lod_level=1` 的 Variable 作为输入,在 :code:`DynamicRNN` 的 :code:`block` 内,用户需自定义RNN的单步计算逻辑。在每一个时间步,用户可将需记忆的状态写入到 :code:`DynamicRNN` 的 :code:`memory` 中,并将需要的输出写出到其 :code:`output` 中。
-:ref:`api_fluid_layers_sequence_last_step` 可获取 :code:`DynamicRNN` 最后一个时间步的输出。
+:ref:`cn_api_fluid_layers_sequence_last_step` 可获取 :code:`DynamicRNN` 最后一个时间步的输出。
-请参考 :ref:`api_fluid_layers_DynamicRNN`
+请参考 :ref:`cn_api_fluid_layers_DynamicRNN`
StaticRNN
=========
即静态RNN,只能处理固定长度的序列数据,接受 :code:`lod_level=0` 的 Variable 作为输入。与 :code:`DynamicRNN` 类似,在RNN的每单个时间步,用户需自定义计算逻辑,并可将状态和输出写出。
-请参考 :ref:`api_fluid_layers_StaticRNN`
+请参考 :ref:`cn_api_fluid_layers_StaticRNN`
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/conv.rst b/doc/fluid/api_cn/api_guides/low_level/layers/conv.rst
index 018c3d56ef96f6101f43b82b5e68ced24ce4942c..3bdc848988fd2506d8816203859a80c84fb5432d 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/conv.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/conv.rst
@@ -39,10 +39,10 @@
空洞卷积相比普通卷积而言,卷积核在特征图上取值时不在连续,而是间隔的,这个间隔数称作dilation,等于1时,即为普通卷积,空洞卷积相比普通卷积的感受野更大。
- API汇总:
- - :ref:`api_fluid_layers_conv2d`
- - :ref:`api_fluid_layers_conv3d`
- - :ref:`api_fluid_layers_conv2d_transpose`
- - :ref:`api_fluid_layers_conv3d_transpose`
+ - :ref:`cn_api_fluid_layers_conv2d`
+ - :ref:`cn_api_fluid_layers_conv3d`
+ - :ref:`cn_api_fluid_layers_conv2d_transpose`
+ - :ref:`cn_api_fluid_layers_conv3d_transpose`
1D序列卷积
@@ -60,5 +60,5 @@ Fluid可以表示变长的序列结构,这里的变长是指不同样本的时
- API汇总:
- - :ref:`api_fluid_layers_sequence_conv`
- - :ref:`api_fluid_layers_row_conv`
+ - :ref:`cn_api_fluid_layers_sequence_conv`
+ - :ref:`cn_api_fluid_layers_row_conv`
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/data_feeder.rst b/doc/fluid/api_cn/api_guides/low_level/layers/data_feeder.rst
index 770116dfb99fcef42184393f77a23d3a61134cc8..495869bdafd9b644b1f66cb2adae99dbcebf976f 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/data_feeder.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/data_feeder.rst
@@ -41,4 +41,4 @@ Python List或Tuple类型对象,其中N为创建 :code:`DataFeeder` 对象时
会完成数据类型和维度的转换。若 :code:`feed_list` 中的变量的 :code:`lod_level` 不为零,则Fluid会将经过维度转换后的
:code:`iterable` 中每行数据的第0维作为返回结果的 :code:`LoD`。
-具体使用方法请参见 :ref:`api_fluid_DataFeeder` 。
\ No newline at end of file
+具体使用方法请参见 :ref:`cn_api_fluid_DataFeeder` 。
\ No newline at end of file
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/data_in_out.rst b/doc/fluid/api_cn/api_guides/low_level/layers/data_in_out.rst
index 9d0a2521ee23615ce614ec4066f16b3a2b3533bf..4517c17fbe4384391d8bad0fead0dd8ad6071246 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/data_in_out.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/data_in_out.rst
@@ -17,7 +17,7 @@ Fluid支持两种数据输入方式,包括:
方法送入训练/预测数据,C++端的训练/预测程序调用队列的 :code:`pop` 方法取出Python端送入的数据。PyReader可与
:code:`double_buffer` 配合使用,实现数据读取和训练/预测的异步执行。
-具体使用方法请参考 :ref:`api_fluid_layers_py_reader`。
+具体使用方法请参考 :ref:`cn_api_fluid_layers_py_reader`。
数据输出
@@ -29,5 +29,5 @@ Fluid支持在训练/预测阶段获取当前batch的数据。
fetch期望的输出变量,通过设置 :code:`return_numpy` 参数设置是否将输出数据转为numpy array。
若 :code:`return_numpy` 为 :code:`False` ,则返回 :code:`LoDTensor` 类型数据。
-具体使用方式请参考相关API文档 :ref:`api_fluid_executor_Executor` 和
-:ref:`api_fluid_ParallelExecutor`。
\ No newline at end of file
+具体使用方式请参考相关API文档 :ref:`cn_api_fluid_executor_Executor` 和
+:ref:`cn_api_fluid_ParallelExecutor`。
\ No newline at end of file
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/detection.rst b/doc/fluid/api_cn/api_guides/low_level/layers/detection.rst
index f277c27ceaa5e1c5649f5212d377442e3fd73860..3a7fc06f01cb3d0df3820c14df51fcb1c09f4722 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/detection.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/detection.rst
@@ -11,15 +11,15 @@ PaddlePaddle Fluid在图像检测任务中实现了多个特有的操作。以
图像检测中的一些通用操作,是对检测框的一系列操作,其中包括:
-* 对检测框的编码,解码(box_coder):实现两种框之间编码和解码的转换。例如训练阶段对先验框和真实框进行编码得到训练目标值。API Reference 请参考 :ref:`api_fluid_layers_box_coder`
+* 对检测框的编码,解码(box_coder):实现两种框之间编码和解码的转换。例如训练阶段对先验框和真实框进行编码得到训练目标值。API Reference 请参考 :ref:`cn_api_fluid_layers_box_coder`
* 比较两个检测框并进行匹配:
- * iou_similarity:计算两组框的IOU值。API Reference 请参考 :ref:`api_fluid_layers_iou_similarity`
+ * iou_similarity:计算两组框的IOU值。API Reference 请参考 :ref:`cn_api_fluid_layers_iou_similarity`
- * bipartite_match:通过贪心二分匹配算法得到每一列中距离最大的一行。API Reference 请参考 :ref:`api_fluid_layers_bipartite_match`
+ * bipartite_match:通过贪心二分匹配算法得到每一列中距离最大的一行。API Reference 请参考 :ref:`cn_api_fluid_layers_bipartite_match`
-* 根据检测框和标签得到分类和回归目标值(target_assign):通过匹配索引和非匹配索引得到目标值和对应权重。API Reference 请参考 :ref:`api_fluid_layers_target_assign`
+* 根据检测框和标签得到分类和回归目标值(target_assign):通过匹配索引和非匹配索引得到目标值和对应权重。API Reference 请参考 :ref:`cn_api_fluid_layers_target_assign`
Faster RCNN
@@ -27,13 +27,13 @@ Faster RCNN
`Faster RCNN `_ 是典型的两阶段目标检测器,相较于传统提取区域的方法,Faster RCNN中RPN网络通过共享卷积层参数大幅提高提取区域的效率,并提出高质量的候选区域。RPN网络需要对输入anchor和真实值进行比较生成初选候选框,并对初选候选框分配分类和回归值,>需要如下四个特有api:
-* rpn_target_assign:通过anchor和真实框为anchor分配RPN网络的分类和回归目标值。API Reference 请参考 :ref:`api_fluid_layers_rpn_target_assign`
+* rpn_target_assign:通过anchor和真实框为anchor分配RPN网络的分类和回归目标值。API Reference 请参考 :ref:`cn_api_fluid_layers_rpn_target_assign`
-* anchor_generator:为每个位置生成一系列anchor。API Reference 请参考 :ref:`api_fluid_layers_anchor_generator`
+* anchor_generator:为每个位置生成一系列anchor。API Reference 请参考 :ref:`cn_api_fluid_layers_anchor_generator`
-* generate_proposal_labels: 通过generate_proposals得到的候选框和真实框得到RCNN部分的分类和回归的目标值。API Reference 请参考 :ref:`api_fluid_layers_generate_proposal_labels`
+* generate_proposal_labels: 通过generate_proposals得到的候选框和真实框得到RCNN部分的分类和回归的目标值。API Reference 请参考 :ref:`cn_api_fluid_layers_generate_proposal_labels`
-* generate_proposals: 对RPN网络输出box解码并筛选得到新的候选框。API Reference 请参考 :ref:`api_fluid_layers_generate_proposals`
+* generate_proposals: 对RPN网络输出box解码并筛选得到新的候选框。API Reference 请参考 :ref:`cn_api_fluid_layers_generate_proposals`
SSD
@@ -41,23 +41,23 @@ SSD
`SSD `_ 全称Single Shot MultiBox Detector,是目标检测领域较新且效果较好的检测算法之一,具有检测速度快且检测精度高的特点。与两阶段的检测方法不同,单阶段目标检测并不进行区域推荐,而是直接从特征图回归出目标的边界框和分类概率。SSD网络对六个尺度特>征图计算损失,进行预测,需要如下五种特有api:
-* Prior Box:根据不同参数为每个输入位置生成一系列候选框。API Reference 请参考 :ref:`api_fluid_layers_prior_box`
+* Prior Box:根据不同参数为每个输入位置生成一系列候选框。API Reference 请参考 :ref:`cn_api_fluid_layers_prior_box`
-* multi_box_head :得到不同prior box的位置和置信度。API Reference 请参考 :ref:`api_fluid_layers_multi_box_head`
+* multi_box_head :得到不同prior box的位置和置信度。API Reference 请参考 :ref:`cn_api_fluid_layers_multi_box_head`
-* detection_output:对prioir box解码,通过多分类NMS得到检测结果。API Reference 请参考 :ref:`api_fluid_layers_detection_output`
+* detection_output:对prioir box解码,通过多分类NMS得到检测结果。API Reference 请参考 :ref:`cn_api_fluid_layers_detection_output`
-* ssd_loss:通过位置偏移预测值,置信度,检测框位置和真实框位置和标签计算损失。API Reference 请参考 :ref:`api_fluid_layers_ssd_loss`
+* ssd_loss:通过位置偏移预测值,置信度,检测框位置和真实框位置和标签计算损失。API Reference 请参考 :ref:`cn_api_fluid_layers_ssd_loss`
-* detection map: 利用mAP评估SSD网络模型。API Reference 请参考 :ref:`api_fluid_layers_detection_map`
+* detection map: 利用mAP评估SSD网络模型。API Reference 请参考 :ref:`cn_api_fluid_layers_detection_map`
OCR
---------
场景文字识别是在图像背景复杂、分辨率低下、字体多样、分布随意等情况下,将图像信息转化为文字序列的过程,可认为是一种特别的翻译过程:将图像输入翻译为自然语言输出。OCR任务中需要对检测框进行不规则变换,其中需要如下两个api:
-* roi_perspective_transform:对输入roi做透视变换。API Reference 请参考 :ref:`api_fluid_layers_roi_perspective_transform`
+* roi_perspective_transform:对输入roi做透视变换。API Reference 请参考 :ref:`cn_api_fluid_layers_roi_perspective_transform`
-* polygon_box_transform:对不规则检测框进行坐标变换。API Reference 请参考 :ref:`api_fluid_layers_polygon_box_transform`
+* polygon_box_transform:对不规则检测框进行坐标变换。API Reference 请参考 :ref:`cn_api_fluid_layers_polygon_box_transform`
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/learning_rate_scheduler.rst b/doc/fluid/api_cn/api_guides/low_level/layers/learning_rate_scheduler.rst
index c617c44958a2f597f4ba3c20f182c6c5dd3e9ad3..7acec0fedd6348745109bbdf29f7a0158c6e44c4 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/learning_rate_scheduler.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/learning_rate_scheduler.rst
@@ -18,23 +18,23 @@
======
* :code:`noam_decay`: 诺姆衰减,相关算法请参考 `《Attention Is All You Need》 `_ 。
- 相关API Reference请参考 :ref:`api_fluid_layers_noam_decay`
+ 相关API Reference请参考 :ref:`cn_api_fluid_layers_noam_decay`
* :code:`exponential_decay`: 指数衰减,即每次将当前学习率乘以给定的衰减率得到下一个学习率。
- 相关API Reference请参考 :ref:`api_fluid_layers_exponential_decay`
+ 相关API Reference请参考 :ref:`cn_api_fluid_layers_exponential_decay`
* :code:`natural_exp_decay`: 自然指数衰减,即每次将当前学习率乘以给定的衰减率的自然指数得到下一个学习率。
- 相关API Reference请参考 :ref:`api_fluid_layers_natural_exp_decay`
+ 相关API Reference请参考 :ref:`cn_api_fluid_layers_natural_exp_decay`
* :code:`inverse_time_decay`: 逆时间衰减,即得到的学习率与当前衰减次数成反比。
- 相关API Reference请参考 :ref:`api_fluid_layers_inverse_time_decay`
+ 相关API Reference请参考 :ref:`cn_api_fluid_layers_inverse_time_decay`
* :code:`polynomial_decay`: 多项式衰减,即得到的学习率为初始学习率和给定最终学习之间由多项式计算权重定比分点的插值。
- 相关API Reference请参考 :ref:`api_fluid_layers_polynomial_decay`
+ 相关API Reference请参考 :ref:`cn_api_fluid_layers_polynomial_decay`
* :code:`piecewise_decay`: 分段衰减,即由给定step数分段呈阶梯状衰减,每段内学习率相同。
- 相关API Reference请参考 :ref:`api_fluid_layers_piecewise_decay`
+ 相关API Reference请参考 :ref:`cn_api_fluid_layers_piecewise_decay`
* :code:`append_LARS`: 通过Layer-wise Adaptive Rate Scaling算法获得学习率,相关算法请参考 `《Train Feedfoward Neural Network with Layer-wise Adaptive Rate via Approximating Back-matching Propagation》 `_ 。
- 相关API Reference请参考 :ref:`api_fluid_layers_append_LARS`
+ 相关API Reference请参考 :ref:`cn_api_fluid_layers_append_LARS`
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/loss_function.rst b/doc/fluid/api_cn/api_guides/low_level/layers/loss_function.rst
index 5802fc4b934183572279f2d5d0d260eda5346710..453a6d559b2e825cd92e52de883e7ad481a9ef71 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/loss_function.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/loss_function.rst
@@ -11,22 +11,22 @@ Paddle Fluid 中提供了面向多种任务的多种类型的损失函数,以
====
平方误差损失(squared error loss)使用预测值和真实值之间误差的平方作为样本损失,是回归问题中最为基本的损失函数。
-API Reference 请参考 :ref:`api_fluid_layers_square_error_cost`。
+API Reference 请参考 :ref:`cn_api_fluid_layers_square_error_cost`。
平滑 L1 损失(smooth_l1 loss)是一种分段的损失函数,较平方误差损失其对异常点相对不敏感,因而更为鲁棒。
-API Reference 请参考 :ref:`api_fluid_layers_smooth_l1`。
+API Reference 请参考 :ref:`cn_api_fluid_layers_smooth_l1`。
分类
====
`交叉熵(cross entropy) `_ 是分类问题中使用最为广泛的损失函数,Paddle Fluid 中提供了接受归一化概率值和非归一化分值输入的两种交叉熵损失函数的接口,并支持 soft label 和 hard label 两种样本类别标签。
-API Reference 请参考 :ref:`api_fluid_layers_cross_entropy` 和 :ref:`api_fluid_layers_softmax_with_cross_entropy`。
+API Reference 请参考 :ref:`cn_api_fluid_layers_cross_entropy` 和 :ref:`cn_api_fluid_layers_softmax_with_cross_entropy`。
多标签分类
---------
对于多标签分类问题,如一篇文章同属于政治、科技等多个类别的情况,需要将各类别作为独立的二分类问题计算损失,Paddle Fluid 中为此提供了 sigmoid_cross_entropy_with_logits 损失函数,
-API Reference 请参考 :ref:`api_fluid_layers_sigmoid_cross_entropy_with_logits`。
+API Reference 请参考 :ref:`cn_api_fluid_layers_sigmoid_cross_entropy_with_logits`。
大规模分类
---------
@@ -34,15 +34,15 @@ API Reference 请参考 :ref:`api_fluid_layers_sigmoid_cross_entropy_with_logits
* 噪声对比估计通过将多分类问题转化为学习分类器来判别数据来自真实分布和噪声分布的二分类问题,基于二分类来进行极大似然估计,避免在全类别空间计算归一化因子从而降低了计算复杂度。
* 层级 sigmoid 通过二叉树进行层级的二分类来实现多分类,每个样本的损失对应了编码路径上各节点二分类交叉熵的和,避免了归一化因子的计算从而降低了计算复杂度。
-这两种方法对应的损失函数在 Paddle Fluid 中均有提供,API Reference 请参考 :ref:`api_fluid_layers_nce` 和 :ref:`api_fluid_layers_hsigmoid`。
+这两种方法对应的损失函数在 Paddle Fluid 中均有提供,API Reference 请参考 :ref:`cn_api_fluid_layers_nce` 和 :ref:`cn_api_fluid_layers_hsigmoid`。
序列分类
-------
序列分类可以分为以下三种:
* 序列分类(Sequence Classification)问题,整个序列对应一个预测标签,如文本分类。这种即是普通的分类问题,可以使用 cross entropy 作为损失函数。
-* 序列片段分类(Segment Classification)问题,序列中的各个片段对应有自己的类别标签,如命名实体识别。对于这种序列标注问题,`(线性链)条件随机场(Conditional Random Field,CRF) `_ 是一种常用的模型方法,其使用句子级别的似然概率,序列中不同位置的标签不再是条件独立,能够有效解决标记偏置问题。Paddle Fluid 中提供了 CRF 对应损失函数的支持,API Reference 请参考 :ref:`api_fluid_layers_linear_chain_crf`。
-* 时序分类(Temporal Classification)问题,需要对未分割的序列进行标注,如语音识别。对于这种时序分类问题,`CTC(Connectionist Temporal Classification) `_ 损失函数不需要对齐输入数据及标签,可以进行端到端的训练,Paddle Fluid 提供了 warpctc 的接口来计算相应的损失,API Reference 请参考 :ref:`api_fluid_layers_warpctc`。
+* 序列片段分类(Segment Classification)问题,序列中的各个片段对应有自己的类别标签,如命名实体识别。对于这种序列标注问题,`(线性链)条件随机场(Conditional Random Field,CRF) `_ 是一种常用的模型方法,其使用句子级别的似然概率,序列中不同位置的标签不再是条件独立,能够有效解决标记偏置问题。Paddle Fluid 中提供了 CRF 对应损失函数的支持,API Reference 请参考 :ref:`cn_api_fluid_layers_linear_chain_crf`。
+* 时序分类(Temporal Classification)问题,需要对未分割的序列进行标注,如语音识别。对于这种时序分类问题,`CTC(Connectionist Temporal Classification) `_ 损失函数不需要对齐输入数据及标签,可以进行端到端的训练,Paddle Fluid 提供了 warpctc 的接口来计算相应的损失,API Reference 请参考 :ref:`cn_api_fluid_layers_warpctc`。
排序
====
@@ -50,11 +50,11 @@ API Reference 请参考 :ref:`api_fluid_layers_sigmoid_cross_entropy_with_logits
`排序问题 `_ 可以使用 Pointwise、Pairwise 和 Listwise 的学习方法,不同的方法需要使用不同的损失函数:
* Pointwise 的方法通过近似为回归问题解决排序问题,可以使用回归问题的损失函数。
-* Pairwise 的方法需要特殊设计的损失函数,其通过近似为分类问题解决排序问题,使用两篇文档与 query 的相关性得分以偏序作为二分类标签来计算损失。Paddle Fluid 中提供了两种常用的 Pairwise 方法的损失函数,API Reference 请参考 :ref:`api_fluid_layers_rank_loss` 和 :ref:`api_fluid_layers_margin_rank_loss`。
+* Pairwise 的方法需要特殊设计的损失函数,其通过近似为分类问题解决排序问题,使用两篇文档与 query 的相关性得分以偏序作为二分类标签来计算损失。Paddle Fluid 中提供了两种常用的 Pairwise 方法的损失函数,API Reference 请参考 :ref:`cn_api_fluid_layers_rank_loss` 和 :ref:`cn_api_fluid_layers_margin_rank_loss`。
更多
====
-对于一些较为复杂的损失函数,可以尝试使用其他损失函数组合实现;Paddle Fluid 中提供的用于图像分割任务的 :ref:`api_fluid_layers_dice_loss` 即是使用其他 OP 组合(计算各像素位置似然概率的均值)而成;多目标损失函数也可看作这样的情况,如 Faster RCNN 就使用 cross entropy 和 smooth_l1 loss 的加权和作为损失函数。
+对于一些较为复杂的损失函数,可以尝试使用其他损失函数组合实现;Paddle Fluid 中提供的用于图像分割任务的 :ref:`cn_api_fluid_layers_dice_loss` 即是使用其他 OP 组合(计算各像素位置似然概率的均值)而成;多目标损失函数也可看作这样的情况,如 Faster RCNN 就使用 cross entropy 和 smooth_l1 loss 的加权和作为损失函数。
-**注意**,在定义损失函数之后为能够使用 :ref:`api_guide_optimizer` 进行优化,通常需要使用 :ref:`api_fluid_layers_mean` 或其他操作将损失函数返回的高维 Tensor 转换为 Scalar 值。
\ No newline at end of file
+**注意**,在定义损失函数之后为能够使用 :ref:`cn_api_guide_optimizer` 进行优化,通常需要使用 :ref:`cn_api_fluid_layers_mean` 或其他操作将损失函数返回的高维 Tensor 转换为 Scalar 值。
\ No newline at end of file
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/math.rst b/doc/fluid/api_cn/api_guides/low_level/layers/math.rst
index 6ae121ccd5540b3f9f7a9df5f9815de1889c06df..7244b7228213b01e661a442b9f015b471ebca5c1 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/math.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/math.rst
@@ -15,77 +15,77 @@ exp
对输入 :code:`Tensor` 逐元素做 :code:`exp` 操作。
-API Reference 请参考 :ref:`api_fluid_layers_exp`
+API Reference 请参考 :ref:`cn_api_fluid_layers_exp`
tanh
------------------
对输入 :code:`Tensor` 逐元素取正切。
-API Reference 请参考 :ref:`api_fluid_layers_tanh`
+API Reference 请参考 :ref:`cn_api_fluid_layers_tanh`
sqrt
------------------
对输入 :code:`Tensor` 逐元素取平方根。
-API Reference 请参考 :ref:`api_fluid_layers_sqrt`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sqrt`
abs
------------------
对输入 :code:`Tensor` 逐元素取绝对值。
-API Reference 请参考 :ref:`api_fluid_layers_abs`
+API Reference 请参考 :ref:`cn_api_fluid_layers_abs`
ceil
------------------
对输入 :code:`Tensor` 逐元素向上取整。
-API Reference 请参考 :ref:`api_fluid_layers_ceil`
+API Reference 请参考 :ref:`cn_api_fluid_layers_ceil`
floor
------------------
对输入 :code:`Tensor` 逐元素向下取整。
-API Reference 请参考 :ref:`api_fluid_layers_floor`
+API Reference 请参考 :ref:`cn_api_fluid_layers_floor`
sin
------------------
对输入 :code:`Tensor` 逐元素取正玄。
-API Reference 请参考 :ref:`api_fluid_layers_sin`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sin`
cos
------------------
对输入 :code:`Tensor` 逐元素取余玄。
-API Reference 请参考 :ref:`api_fluid_layers_cos`
+API Reference 请参考 :ref:`cn_api_fluid_layers_cos`
round
------------------
对输入 :code:`Tensor` 逐元素四舍五入取整。
-API Reference 请参考 :ref:`api_fluid_layers_round`
+API Reference 请参考 :ref:`cn_api_fluid_layers_round`
square
------------------
对输入 :code:`Tensor` 逐元素取平方。
-API Reference 请参考 :ref:`api_fluid_layers_square`
+API Reference 请参考 :ref:`cn_api_fluid_layers_square`
reciprocal
------------------
对输入 :code:`Tensor` 逐元素取倒数。
-API Reference 请参考 :ref:`api_fluid_layers_reciprocal`
+API Reference 请参考 :ref:`cn_api_fluid_layers_reciprocal`
reduce
@@ -94,11 +94,11 @@ reduce
对输入 :code:`Tensor` 在指定的若干轴上做reduce操作,包括:min, max, sum, mean, product
API Reference 请参考:
-:ref:`api_fluid_layers_reduce_min`
-:ref:`api_fluid_layers_reduce_max`
-:ref:`api_fluid_layers_reduce_sum`
-:ref:`api_fluid_layers_reduce_mean`
-:ref:`api_fluid_layers_reduce_prod`
+:ref:`cn_api_fluid_layers_reduce_min`
+:ref:`cn_api_fluid_layers_reduce_max`
+:ref:`cn_api_fluid_layers_reduce_sum`
+:ref:`cn_api_fluid_layers_reduce_mean`
+:ref:`cn_api_fluid_layers_reduce_prod`
二元操作
@@ -109,28 +109,28 @@ elementwise_add
对两个 :code:`Tensor` 逐元素相加,对应的数学操作符为 :code:`+`
-API Reference 请参考 :ref:`api_fluid_layers_elementwise_add`
+API Reference 请参考 :ref:`cn_api_fluid_layers_elementwise_add`
elementwise_sub
------------------
对两个 :code:`Tensor` 逐元素相减,对应数学操作符 :code:`-`
-API Reference 请参考 :ref:`api_fluid_layers_elementwise_sub`
+API Reference 请参考 :ref:`cn_api_fluid_layers_elementwise_sub`
elementwise_mul
------------------
对两个 :code:`Tensor` 逐元素相乘, 对应数学操作符 :code:`*`
-API Reference 请参考 :ref:`api_fluid_layers_elementwise_mul`
+API Reference 请参考 :ref:`cn_api_fluid_layers_elementwise_mul`
elementwise_div
------------------
对两个 :code:`Tensor` 逐元素相除, 对应数学操作符 :code:`/` 或 :code:`//`
-API Reference 请参考 :ref:`api_fluid_layers_elementwise_div`
+API Reference 请参考 :ref:`cn_api_fluid_layers_elementwise_div`
elementwise_pow
@@ -138,74 +138,74 @@ elementwise_pow
对两个 :code:`Tensor` 逐元素做次幂操作, 对应数学操作符 :code:`**`
-API Reference 请参考 :ref:`api_fluid_layers_elementwise_pow`
+API Reference 请参考 :ref:`cn_api_fluid_layers_elementwise_pow`
equal
------------------
对两个 :code:`Tensor` 逐元素判断是否相等, 对应数学操作符 :code:`==`
-API Reference 请参考 :ref:`api_fluid_layers_equal`
+API Reference 请参考 :ref:`cn_api_fluid_layers_equal`
not_equal
------------------
对两个 :code:`Tensor` 逐元素判断是否不等, 对应数学操作符 :code:`!=`
-API Reference 请参考 :ref:`api_fluid_layers_elementwise_not_equal`
+API Reference 请参考 :ref:`cn_api_fluid_layers_elementwise_not_equal`
less_than
------------------
对两个 :code:`Tensor` 逐元素判断是否满足小于关系, 对应数学操作符 :code:`<`
-API Reference 请参考 :ref:`api_fluid_layers_less_than`
+API Reference 请参考 :ref:`cn_api_fluid_layers_less_than`
less_equal
------------------
对两个 :code:`Tensor` 逐元素判断是否满足小于或等于关系, 对应数学操作符 :code:`<=`
-API Reference 请参考 :ref:`api_fluid_layers_less_equal`
+API Reference 请参考 :ref:`cn_api_fluid_layers_less_equal`
greater_than
------------------
对两个 :code:`Tensor` 逐元素判断是否满足大于关系, 对应数学操作符 :code:`>`
-API Reference 请参考 :ref:`api_fluid_layers_greater_than`
+API Reference 请参考 :ref:`cn_api_fluid_layers_greater_than`
greater_equal
------------------
对两个 :code:`Tensor` 逐元素判断是否满足大于或等于关系, 对应数学操作符 :code:`>=`
-API Reference 请参考 :ref:`api_fluid_layers_greater_equal`
+API Reference 请参考 :ref:`cn_api_fluid_layers_greater_equal`
sum
------------------
对两个 :code:`Tensor` 逐元素相加。
-API Reference 请参考 :ref:`api_fluid_layers_sum`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sum`
min
------------------
对两个 :code:`Tensor` 逐元素进行 :code:`min(x, y)` 操作。
-API Reference 请参考 :ref:`api_fluid_layers_min`
+API Reference 请参考 :ref:`cn_api_fluid_layers_min`
max
------------------
对两个 :code:`Tensor` 逐元素进行 :code:`max(x, y)` 操作。
-API Reference 请参考 :ref:`api_fluid_layers_max`
+API Reference 请参考 :ref:`cn_api_fluid_layers_max`
matmul
------------------
对两个 :code:`Tensor` 进行矩阵乘操作。
-API Reference 请参考 :ref:`api_fluid_layers_matmul`
+API Reference 请参考 :ref:`cn_api_fluid_layers_matmul`
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/pooling.rst b/doc/fluid/api_cn/api_guides/low_level/layers/pooling.rst
index de4a1bd82cc144b6237d4ec171576d93b1d8aaf9..32a2e97baf08377a95735f303efdda43759ce668 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/pooling.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/pooling.rst
@@ -40,8 +40,8 @@ PaddlePaddle中有针对定长图像特征的二维(pool2d)、三维卷积(pool3
api汇总:
-- :ref:`api_fluid_layers_pool2d`
-- :ref:`api_fluid_layers_pool3d`
+- :ref:`cn_api_fluid_layers_pool2d`
+- :ref:`cn_api_fluid_layers_pool3d`
2. roi_pool
@@ -58,7 +58,7 @@ api汇总:
api汇总:
-- :ref:`api_fluid_layers_roi_pool`
+- :ref:`cn_api_fluid_layers_roi_pool`
3. sequence_pool
@@ -77,4 +77,4 @@ api汇总:
api汇总:
-- :ref:`api_fluid_layers_sequence_pool`
\ No newline at end of file
+- :ref:`cn_api_fluid_layers_sequence_pool`
\ No newline at end of file
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/sequence.rst b/doc/fluid/api_cn/api_guides/low_level/layers/sequence.rst
index 455e8e9b51c4196a2adc450a0f14e87512381480..3c2dba96cb2c7c2378afdba78cfcd05de1b484ae 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/sequence.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/sequence.rst
@@ -7,7 +7,7 @@
在深度学习领域许多问题涉及到对 `序列(sequence) `_ 的处理。
从Wiki上的释义可知,序列可以表征多种物理意义,但在深度学习中,最常见的仍然是"时间序列"——一个序列包含多个时间步的信息。
-在Paddle Fluid中,我们将序列表示为 :ref:`api_fluid_LoDTensor` 。
+在Paddle Fluid中,我们将序列表示为 :ref:`cn_api_fluid_LoDTensor` 。
因为一般进行神经网络计算时都是一个batch一个batch地计算,所以我们用一个LoDTensor来存储一个mini batch的序列。
一个LoDTensor的第0维包含该mini batch中所有序列的所有时间步,并且用LoD来记录各个序列的长度,区分不同序列。
而在运算时,还需要根据LoD信息将LoDTensor中一个mini batch的第0维拆开成多个序列。(具体请参考上述LoD相关的文档。)
@@ -26,7 +26,7 @@
这个layer以一个mini batch的序列为输入,在每个序列内做softmax操作。其输出为一个mini batch相同shape的序列,但在序列内是经softmax归一化过的。
这个layer往往用于在每个sequence内做softmax归一化。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_softmax`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_softmax`
2. sequence_concat
@@ -35,21 +35,21 @@ API Reference 请参考 :ref:`api_fluid_layers_sequence_softmax`
该layer会将每个batch中第i个序列在时间维度上拼接成一个新序列,作为返回的batch中的第i个序列。
理所当然地,list中每个LoDTensor的序列必须有相同的batch size。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_concat`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_concat`
3. sequence_first_step
----------------------
这个layer以一个LoDTensor作为输入,会取出每个序列中的第一个元素(即第一个时间步的元素),并作为返回值。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_first_step`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_first_step`
4. sequence_last_step
---------------------
同 :code:`sequence_first_step` ,除了本layer是取每个序列中最后一个元素(即最后一个时间步)作为返回值。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_last_step`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_last_step`
5. sequence_expand
@@ -57,7 +57,7 @@ API Reference 请参考 :ref:`api_fluid_layers_sequence_last_step`
这个layer有两个LoDTensor的序列作为输入,并按照第二个LoDTensor中序列的LoD信息来扩展第一个batch中的序列。
通常用来将只有一个时间步的序列(例如 :code:`sequence_first_step` 的返回结果)延展成有多个时间步的序列,以此方便与有多个时间步的序列进行运算。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_expand`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_expand`
6. sequence_expand_as
@@ -66,14 +66,14 @@ API Reference 请参考 :ref:`api_fluid_layers_sequence_expand`
不同于 :code:`sequence_expand` ,这个layer会将第一个LoDTensor中的序列严格延展为和第二个LoDTensor中的序列等长。
如果无法延展成等长的(例如第二个batch中的序列长度不是第一个batch中序列长度的整数倍),则会报错。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_expand_as`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_expand_as`
7. sequence_enumerate
---------------------
这个layer需要一个LoDTensor的序列作为输入,同时需要指定一个 :code:`win_size` 的长度。这个layer将依次取所有序列中长度为 :code:`win_size` 的子序列,并组合成新的序列。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_enumerate`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_enumerate`
8. sequence_reshape
@@ -81,7 +81,7 @@ API Reference 请参考 :ref:`api_fluid_layers_sequence_enumerate`
这个layer需要一个LoDTensor的序列作为输入,同时需要指定一个 :code:`new_dim` 作为新的序列的维度。
该layer会将mini batch内每个序列reshape为new_dim给定的维度。注意,每个序列的长度会改变(因此LoD信息也会变),以适应新的形状。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_reshape`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_reshape`
9. sequence_scatter
@@ -89,7 +89,7 @@ API Reference 请参考 :ref:`api_fluid_layers_sequence_reshape`
这个layer可以将一个序列的数据scatter到另一个tensor上。这个layer有三个input,一个要被scatter的目标tensor :code:`input`;
一个是序列的数据 :code:`update` ,一个是目标tensor的上坐标 :code:`index` 。Output为scatter后的tensor,形状和 :code:`input` 相同。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_scatter`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_scatter`
10. sequence_pad
@@ -98,7 +98,7 @@ API Reference 请参考 :ref:`api_fluid_layers_sequence_scatter`
前者是用来补齐序列的元素,可以是一个数也可以是一个tensor;后者是序列补齐的目标长度。
这个layer会返回补齐后的序列,以及一个记录补齐前各个序列长度的tensor :code:`Length`。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_pad`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_pad`
11. sequence_mask
@@ -108,5 +108,5 @@ API Reference 请参考 :ref:`api_fluid_layers_sequence_pad`
通常这个layer用于生成一个mask,将被pad后的序列中pad的部分过滤掉。
:code:`input` 的长度tensor通常可以直接用 :code:`sequence_pad` 返回的 :code:`Length`。
-API Reference 请参考 :ref:`api_fluid_layers_sequence_mask`
+API Reference 请参考 :ref:`cn_api_fluid_layers_sequence_mask`
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/sparse_update.rst b/doc/fluid/api_cn/api_guides/low_level/layers/sparse_update.rst
index ae49a70c2bc7c3dac330deacef9637e888884ee6..a25e4beabb691f597fa3e7fc45e8ca07f1742c1e 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/sparse_update.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/sparse_update.rst
@@ -4,7 +4,7 @@
稀疏更新
#####
-Fluid的 :ref:`api_fluid_layers_embedding` 层在单机训练和分布式训练时,均可以支持“稀疏更新”,即梯度以sparse tensor 结构存储,只保存梯度不为0的行。
+Fluid的 :ref:`cn_api_fluid_layers_embedding` 层在单机训练和分布式训练时,均可以支持“稀疏更新”,即梯度以sparse tensor 结构存储,只保存梯度不为0的行。
在分布式训练中,对于较大的embedding层,开启稀疏更新有助于减少通信数据量,提升训练速度。
在paddle内部,我们用lookup_table来实现embedding。下边这张图说明了embedding在正向和反向计算的过程:
@@ -17,7 +17,7 @@ Fluid的 :ref:`api_fluid_layers_embedding` 层在单机训练和分布式训练
embedding使用例子:
---------------------
-API详细使用方法参考 :ref:`api_fluid_layers_embedding` ,以下是一个简单的例子:
+API详细使用方法参考 :ref:`cn_api_fluid_layers_embedding` ,以下是一个简单的例子:
.. code-block:: python
@@ -39,7 +39,7 @@ API详细使用方法参考 :ref:`api_fluid_layers_embedding` ,以下是一个
- :code:`is_sparse` : 反向计算的时候梯度是否为sparse tensor。如果不设置,梯度是一个 `LodTensor `_ 。默认为False。
-- :code:`is_distributed` : 标志是否是用在分布式的场景下。一般大规模稀疏更新(embedding的第0维维度很大,比如几百万以上)才需要设置。具体可以参考大规模稀疏的API guide :ref:`api_guide_async_training` 。默认为False。
+- :code:`is_distributed` : 标志是否是用在分布式的场景下。一般大规模稀疏更新(embedding的第0维维度很大,比如几百万以上)才需要设置。具体可以参考大规模稀疏的API guide :ref:`cn_api_guide_async_training` 。默认为False。
- API汇总:
- - :ref:`api_fluid_layers_embedding`
+ - :ref:`cn_api_fluid_layers_embedding`
diff --git a/doc/fluid/api_cn/api_guides/low_level/layers/tensor.rst b/doc/fluid/api_cn/api_guides/low_level/layers/tensor.rst
index a0549fcb84fe537820b935a311071c78d32f8733..2d1e98111ec20913a4447f4ac677f6da71f0a366 100644
--- a/doc/fluid/api_cn/api_guides/low_level/layers/tensor.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/layers/tensor.rst
@@ -15,14 +15,14 @@ Tensor
---------------------
Tensor用于在框架中承载数据,使用 :code:`create_tensor` 可以创建一个指定数据类型的Lod-Tensor变量,
-API reference 请参考: :ref:`api_fluid_layers_create_tensor`
+API reference 请参考: :ref:`cn_api_fluid_layers_create_tensor`
2. create_parameter
---------------------
神经网络的训练过程是一个对参数的学习过程,Fluid 使用 :code:`create_parameter` 创建一个可学习的参数。该参数的值可以被operator改变。
-API reference 请参考::ref:`api_fluid_layers_create_parameter`
+API reference 请参考::ref:`cn_api_fluid_layers_create_parameter`
@@ -30,7 +30,7 @@ API reference 请参考::ref:`api_fluid_layers_create_parameter`
---------------------
Fluid 使用 :code:`create_global_var` 创建一个全局tensor,通过此 API 可以指定被创建 Tensor 变量的数据类型、形状和值。
-API reference 请参考::ref:`api_fluid_layers_create_global_var`
+API reference 请参考::ref:`cn_api_fluid_layers_create_global_var`
4. cast
@@ -38,7 +38,7 @@ API reference 请参考::ref:`api_fluid_layers_create_global_var`
Fluid 使用 :code:`cast` 将数据转换为指定类型。
-API reference 请参考::ref:`api_fluid_layers_cast`
+API reference 请参考::ref:`cn_api_fluid_layers_cast`
5. concat
@@ -46,7 +46,7 @@ API reference 请参考::ref:`api_fluid_layers_cast`
Fluid 使用 :code:`concat` 将输入数据沿指定维度连接。
-API reference 请参考::ref:`api_fluid_layers_concat`
+API reference 请参考::ref:`cn_api_fluid_layers_concat`
6. sums
@@ -54,7 +54,7 @@ API reference 请参考::ref:`api_fluid_layers_concat`
Fluid 使用 :code:`sums` 执行对输入数据的加和。
-API reference 请参考::ref:`api_fluid_layers_sums`
+API reference 请参考::ref:`cn_api_fluid_layers_sums`
7. fill_constant_batch_size_like
@@ -62,63 +62,63 @@ API reference 请参考::ref:`api_fluid_layers_sums`
Fluid 使用 :code:`fill_constant_batch_size_like` 创建一个具有特定形状、类型和 batch_size 的 Tensor。并且该Tensor的初始值可以被指定为任意常数。其中 batch_size 信息由该tensor的 :code:`input_dim_idx` 和 :code:`output_dim_idx` 确定。
-API reference 请参考::ref:`api_fluid_layers_fill_constant_batch_size_like`
+API reference 请参考::ref:`cn_api_fluid_layers_fill_constant_batch_size_like`
8. fill_constant
-----------------
Fluid 使用 :code:`fill_constant` 创建一个具有特定形状和类型的 Tensor。可以通过 :code:`value` 设置该变量的初始值。
-API reference 请参考: :ref:`api_fluid_layers_fill_constant`
+API reference 请参考: :ref:`cn_api_fluid_layers_fill_constant`
9. assign
---------------
Fluid 使用 :code:`assign` 复制一个变量。
-API reference 请参考::ref:`api_fluid_layers_assign`
+API reference 请参考::ref:`cn_api_fluid_layers_assign`
10. argmin
--------------
Fluid 使用 :code:`argmin` 计算输入 Tensor 指定轴上最小元素的索引。
-API reference 请参考::ref:`api_fluid_layers_assign`
+API reference 请参考::ref:`cn_api_fluid_layers_assign`
11. argmax
-----------
Fluid 使用 :code:`argmax` 计算输入 Tensor 指定轴上最大元素的索引。
-API reference 请参考::ref:`api_fluid_layers_argmax`
+API reference 请参考::ref:`cn_api_fluid_layers_argmax`
12. argsort
------------
Fluid 使用 :code:`argsort` 对输入 Tensor 在指定轴上进行排序,并返回排序后的数据变量及其对应的索引值。
-API reference 请参考: :ref:`api_fluid_layers_argsort`
+API reference 请参考: :ref:`cn_api_fluid_layers_argsort`
13. ones
-------------
Fluid 使用 :code:`ones` 创建一个指定大小和数据类型的Tensor,且初始值为1。
-API reference 请参考: :ref:`api_fluid_layers_ones`
+API reference 请参考: :ref:`cn_api_fluid_layers_ones`
14. zeros
---------------
Fluid 使用 :code:`zeros` 创建一个指定大小和数据类型的Tensor,且初始值为0。
-API reference 请参考: :ref:`api_fluid_layers_zeros`
+API reference 请参考: :ref:`cn_api_fluid_layers_zeros`
15. reverse
-------------------
Fluid 使用 :code:`reverse` 沿指定轴反转 Tensor。
-API reference 请参考: :ref:`api_fluid_layers_reverse`
+API reference 请参考: :ref:`cn_api_fluid_layers_reverse`
@@ -132,18 +132,18 @@ LoD-Tensor非常适用于序列数据,相关知识可以参考阅读 `LoD_Tens
Fluid 使用 :code:`create_lod_tensor` 基于numpy数组、列表或现有 LoD_Tensor 创建拥有新的层级信息的 LoD_Tensor。
-API reference 请参考: :ref:`api_fluid_create_lod_tensor`
+API reference 请参考: :ref:`cn_api_fluid_create_lod_tensor`
2. create_random_int_lodtensor
----------------------------------
Fluid 使用 :code:`create_random_int_lodtensor` 创建一个由随机整数组成的 LoD_Tensor。
-API reference 请参考: :ref:`api_fluid_create_random_int_lodtensor`
+API reference 请参考: :ref:`cn_api_fluid_create_random_int_lodtensor`
3. reorder_lod_tensor_by_rank
---------------------------------
Fluid 使用 :code:`reorder_lod_tensor_by_rank` 对输入 LoD_Tensor 的序列信息按指定顺序重拍。
-API reference 请参考::ref:`api_fluid_layers_reorder_lod_tensor_by_rank`
\ No newline at end of file
+API reference 请参考::ref:`cn_api_fluid_layers_reorder_lod_tensor_by_rank`
\ No newline at end of file
diff --git a/doc/fluid/api_cn/api_guides/low_level/metrics.rst b/doc/fluid/api_cn/api_guides/low_level/metrics.rst
index 90531d61635a7f35dd2101e554bdbaaa0fe31a17..4044483704a37a779b6e65a41565fd2a3400ed4f 100644
--- a/doc/fluid/api_cn/api_guides/low_level/metrics.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/metrics.rst
@@ -11,24 +11,24 @@
- 准确率: :code:`Precision` ,用来衡量二分类中召回真值和召回值的比例。
- API Reference 请参考 :ref:`api_fluid_metrics_Precision`
+ API Reference 请参考 :ref:`cn_api_fluid_metrics_Precision`
- 正确率: :code:`Accuracy` ,用来衡量二分类中召回真值和总样本数的比例。需要注意的是,准确率和正确率的定义是不同的,可以类比于误差分析中的 :code:`Variance` 和 :code:`Bias` 。
- API Reference 请参考 :ref:`api_fluid_metrics_Accuracy`
+ API Reference 请参考 :ref:`cn_api_fluid_metrics_Accuracy`
- 召回率: :code:`Recall` ,用来衡量二分类中召回值和总样本数的比例。准确率和召回率的选取相互制约,实际模型中需要进行权衡,可以参考文档 `Precision_and_recall `_ 。
- API Reference 请参考 :ref:`api_fluid_metrics_Recall`
+ API Reference 请参考 :ref:`cn_api_fluid_metrics_Recall`
- AUC: :code:`Area Under Curve`, 适用于二分类的分类模型评估,用来计算 `ROC曲线的累积面积 `_。:code:`Auc` 通过python计算实现,如果关注性能,可以使用 :code:`fluid.layers.auc` 代替。
- API Reference 请参考 :ref:`api_fluid_metrics_Auc`
+ API Reference 请参考 :ref:`cn_api_fluid_metrics_Auc`
- 平均准确度: :code:`Average Precision` ,常用在Faster R-CNN和SSD等物体检测任务中。在不同召回条件下,计算了准确率的平均值,具体可以参考文档 `Average-precision `_ 和 `SSD: Single Shot MultiBox Detector `_。
- API Reference 请参考 :ref:`api_fluid_metrics_DetectionMAP`
+ API Reference 请参考 :ref:`cn_api_fluid_metrics_DetectionMAP`
@@ -38,7 +38,7 @@
- 语块评估方法: :code:`ChunkEvaluator` ,接收 :code:`chunk_eval` 接口的输出,累积每一个minibatch的语块统计值,最后计算准确率、召回率和F1值。:code:`ChunkEvaluator` 支持IOB, IOE, IOBES和IO四种标注模式。可以参考文档 `Chunking with Support Vector Machines `_ 。
- API Reference 请参考 :ref:`api_fluid_metrics_ChunkEvaluator`
+ API Reference 请参考 :ref:`cn_api_fluid_metrics_ChunkEvaluator`
生成任务评价
@@ -47,5 +47,5 @@
- 编辑距离: :code:`EditDistance` ,用来衡量两个字符串的相似度。可以参考文档 `Edit_distance `_。
- API Reference 请参考 :ref:`api_fluid_metrics_EditDistance`
+ API Reference 请参考 :ref:`cn_api_fluid_metrics_EditDistance`
diff --git a/doc/fluid/api_cn/api_guides/low_level/model_save_reader.rst b/doc/fluid/api_cn/api_guides/low_level/model_save_reader.rst
index 8edae985082970cc94c867bc7802e7714af90670..b0ed7ef10a8b580e6e685e539769d9113c0c8f41 100644
--- a/doc/fluid/api_cn/api_guides/low_level/model_save_reader.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/model_save_reader.rst
@@ -10,12 +10,12 @@
变量、持久性变量和参数
====================
-在 :code:`Paddle` 中,算子(:code:`Operator`)的每一个输入和输出都是一个变量(:code:`Variable`),而参数(:code:`Parameter`)是变量(:code:`Variable`)的子类。持久性变量(:code:`Persistables`)是一种在每次迭代结束后均不会被删除的变量。参数是一种持久性变量,其在每次迭代后都会被优化器(:ref:`api_guide_optimizer`)更新。训练神经网络本质上就是在更新参数。
+在 :code:`Paddle` 中,算子(:code:`Operator`)的每一个输入和输出都是一个变量(:code:`Variable`),而参数(:code:`Parameter`)是变量(:code:`Variable`)的子类。持久性变量(:code:`Persistables`)是一种在每次迭代结束后均不会被删除的变量。参数是一种持久性变量,其在每次迭代后都会被优化器(:ref:`cn_api_guide_optimizer`)更新。训练神经网络本质上就是在更新参数。
模型保存API介绍
====================
-- :code:`fluid.io.save_vars`:通过执行器(:ref:`api_guide_executor`)保存变量到指定的目录中。保存变量的方式有两种:
+- :code:`fluid.io.save_vars`:通过执行器(:ref:`cn_api_guide_executor`)保存变量到指定的目录中。保存变量的方式有两种:
1)通过接口中的 :code:`vars` 指定需要保存的变量列表。
@@ -23,17 +23,17 @@
第一种保存方式的优先级要高于第二种。
- API Reference 请参考 :ref:`api_fluid_io_save_vars`。
+ API Reference 请参考 :ref:`cn_api_fluid_io_save_vars`。
- :code:`fluid.io.save_params`:通过接口中的 :code:`main_program` 指定好程序(:code:`Program`),该接口会将所指定程序中的全部参数(:code:`Parameter`)过滤出来,并将它们保存到 :code:`dirname` 指定的文件夹或 :code:`filename` 指定的文件中。
- API Reference 请参考 :ref:`api_fluid_io_save_params`。
+ API Reference 请参考 :ref:`cn_api_fluid_io_save_params`。
- :code:`fluid.io.save_persistables`:通过接口中的 :code:`main_program` 指定好程序(:code:`Program`),该接口会将所指定程序中的全部持久性变量(:code:`persistable==True`)过滤出来,并将它们保存到 :code:`dirname` 指定的文件夹或 :code:`filename` 指定的文件中。
- API Reference 请参考 :ref:`api_fluid_io_save_persistables`。
+ API Reference 请参考 :ref:`cn_api_fluid_io_save_persistables`。
-- :code:`fluid.io.save_inference_model`:请参考 :ref:`api_guide_inference`。
+- :code:`fluid.io.save_inference_model`:请参考 :ref:`cn_api_guide_inference`。
模型加载API介绍
====================
@@ -46,14 +46,14 @@
第一种加载方式的优先级要高于第二种。
- API Reference 请参考 :ref:`api_fluid_io_load_vars`。
+ API Reference 请参考 :ref:`cn_api_fluid_io_load_vars`。
- :code:`fluid.io.load_params`:该接口从 :code:`main_program` 指定的程序中过滤出全部参数(:code:`Parameter`),并试图从 :code:`dirname` 指定的文件夹或 :code:`filename` 指定的文件中加载这些参数。
- API Reference 请参考 :ref:`api_fluid_io_load_params`。
+ API Reference 请参考 :ref:`cn_api_fluid_io_load_params`。
- :code:`fluid.io.load_persistables`:该接口从 :code:`main_program` 指定的程序中过滤出全部持久性变量(:code:`persistable==True`),并试图从 :code:`dirname` 指定的文件夹或 :code:`filename` 指定的文件中加载这些持久性变量。
- API Reference 请参考 :ref:`api_fluid_io_load_persistables`。
+ API Reference 请参考 :ref:`cn_api_fluid_io_load_persistables`。
-- :code:`fluid.io.load_inference_model`:请参考 :ref:`api_guide_inference`。
+- :code:`fluid.io.load_inference_model`:请参考 :ref:`cn_api_guide_inference`。
diff --git a/doc/fluid/api_cn/api_guides/low_level/nets.rst b/doc/fluid/api_cn/api_guides/low_level/nets.rst
index 38c1b24a785e18ae3929d450c30d81584ce302f9..134d9359f829f473c23e17e5cac261574cb7d20c 100644
--- a/doc/fluid/api_cn/api_guides/low_level/nets.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/nets.rst
@@ -11,45 +11,45 @@
1.simple_img_conv_pool
----------------------
-:code:`simple_img_conv_pool` 是由 :ref:`api_fluid_layers_conv2d` 与 :ref:`api_fluid_layers_pool2d` 串联而成。
+:code:`simple_img_conv_pool` 是由 :ref:`cn_api_fluid_layers_conv2d` 与 :ref:`cn_api_fluid_layers_pool2d` 串联而成。
该模块在图像分类模型中广泛使用,比如应用在 `MNIST `_ 数字分类的问题。
-API Reference 请参考 :ref:`api_fluid_nets_simple_img_conv_pool`
+API Reference 请参考 :ref:`cn_api_fluid_nets_simple_img_conv_pool`
2.img_conv_group
----------------
-:code:`img_conv_group` 是由 :ref:`api_fluid_layers_conv2d` , :ref:`api_fluid_layers_batch_norm`, :ref:`api_fluid_layers_dropout` 和 :ref:`api_fluid_layers_pool2d` 组成。
-该模块可以实现多个 :ref:`api_fluid_layers_conv2d` , :ref:`api_fluid_layers_batch_norm` 和 :ref:`api_fluid_layers_dropout` 的串联单元与一个 :ref:`api_fluid_layers_pool2d` 的组合。
-其中, :ref:`api_fluid_layers_conv2d` , :ref:`api_fluid_layers_batch_norm` 和 :ref:`api_fluid_layers_dropout` 的数量都可以分别控制,从而得到多样的组合。
+:code:`img_conv_group` 是由 :ref:`cn_api_fluid_layers_conv2d` , :ref:`cn_api_fluid_layers_batch_norm`, :ref:`cn_api_fluid_layers_dropout` 和 :ref:`cn_api_fluid_layers_pool2d` 组成。
+该模块可以实现多个 :ref:`cn_api_fluid_layers_conv2d` , :ref:`cn_api_fluid_layers_batch_norm` 和 :ref:`cn_api_fluid_layers_dropout` 的串联单元与一个 :ref:`cn_api_fluid_layers_pool2d` 的组合。
+其中, :ref:`cn_api_fluid_layers_conv2d` , :ref:`cn_api_fluid_layers_batch_norm` 和 :ref:`cn_api_fluid_layers_dropout` 的数量都可以分别控制,从而得到多样的组合。
该模块广泛使用在比较复杂的图像分类任务中,比如 `VGG `_ 。
-API Reference 请参考 :ref:`api_fluid_nets_img_conv_group`
+API Reference 请参考 :ref:`cn_api_fluid_nets_img_conv_group`
3.sequence_conv_pool
--------------------
-:code:`sequence_conv_pool` 是由 :ref:`api_fluid_layers_sequence_conv` 与 :ref:`api_fluid_layers_sequence_pool` 串联而成。
+:code:`sequence_conv_pool` 是由 :ref:`cn_api_fluid_layers_sequence_conv` 与 :ref:`cn_api_fluid_layers_sequence_pool` 串联而成。
该模块在 `自然语言处理 `_ 以及 `语音识别 `_ 等领域均有广泛应用,
比如 `文本分类模型 `_ ,
`TagSpace `_ 以及 `Multi-view Simnet `_ 等模型。
-API Reference 请参考 :ref:`api_fluid_nets_sequence_conv_pool`
+API Reference 请参考 :ref:`cn_api_fluid_nets_sequence_conv_pool`
4.glu
-----
-:code:`glu` 全称 Gated Linear Units, 来源于论文 `Language Modeling with Gated Convolutional Networks `_ ,由 :ref:`api_fluid_layers_split` , :ref:`api_fluid_layers_sigmoid` 和 :ref:`api_fluid_layers_elementwise_mul` 组成。
+:code:`glu` 全称 Gated Linear Units, 来源于论文 `Language Modeling with Gated Convolutional Networks `_ ,由 :ref:`cn_api_fluid_layers_split` , :ref:`cn_api_fluid_layers_sigmoid` 和 :ref:`cn_api_fluid_layers_elementwise_mul` 组成。
它会把输入数据均分为2等份,并对第二部分求 `Sigmoid `_ , 然后再与第一部分数据求点乘得到输出。
-API Reference 请参考 :ref:`api_fluid_nets_glu`
+API Reference 请参考 :ref:`cn_api_fluid_nets_glu`
5.scaled_dot_product_attention
------------------------------
-:code:`scaled_dot_product_attention` 来源于论文 `Attention Is All You Need `_ ,主要是由 :ref:`api_fluid_layers_fc` 和 :ref:`api_fluid_layers_softmax` 组成。
+:code:`scaled_dot_product_attention` 来源于论文 `Attention Is All You Need `_ ,主要是由 :ref:`cn_api_fluid_layers_fc` 和 :ref:`cn_api_fluid_layers_softmax` 组成。
对于输入数据 :code:`Queries` , :code:`Key` 和 :code:`Values` 按照如下公式求出 :code:`Attention` 。
.. math::
@@ -57,5 +57,5 @@ API Reference 请参考 :ref:`api_fluid_nets_glu`
该模块广泛使用在 `机器翻译 `_ 的模型中,比如 `Transformer `_ 。
-API Reference 请参考 :ref:`api_fluid_nets_scaled_dot_product_attention`
+API Reference 请参考 :ref:`cn_api_fluid_nets_scaled_dot_product_attention`
diff --git a/doc/fluid/api_cn/api_guides/low_level/optimizer.rst b/doc/fluid/api_cn/api_guides/low_level/optimizer.rst
index e068bd4801081e129ca24a9208699f1f0d5bf927..e7fc61165a4070b305f738f1420758bc45c31cb1 100644
--- a/doc/fluid/api_cn/api_guides/low_level/optimizer.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/optimizer.rst
@@ -14,7 +14,7 @@
:code:`SGD` 是实现 `随机梯度下降 `_ 的一个 :code:`Optimizer` 子类,是 `梯度下降 `_ 大类中的一种方法。
当需要训练大量样本的时候,往往选择 :code:`SGD` 来使损失函数更快的收敛。
-API Reference 请参考 :ref:`api_fluid_optimizer_SGDOptimizer`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_SGDOptimizer`
2.Momentum/MomentumOptimizer
@@ -25,14 +25,14 @@ API Reference 请参考 :ref:`api_fluid_optimizer_SGDOptimizer`
`_ 算法和 `Nesterov accelerated gradient(论文4.2节)
`_ 算法。
-API Reference 请参考 :ref:`api_fluid_optimizer_MomentumOptimizer`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_MomentumOptimizer`
3. Adagrad/AdagradOptimizer
---------------------------
`Adagrad `_ 优化器可以针对不同参数样本数不平均的问题,自适应地为各个参数分配不同的学习率。
-API Reference 请参考 :ref:`api_fluid_optimizer_AdagradOptimizer`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_AdagradOptimizer`
4.RMSPropOptimizer
@@ -40,7 +40,7 @@ API Reference 请参考 :ref:`api_fluid_optimizer_AdagradOptimizer`
`RMSProp优化器 `_ ,是一种自适应调整学习率的方法,
主要解决使用Adagrad后,模型训练中后期学习率急剧下降的问题。
-API Reference 请参考 :ref:`api_fluid_optimizer_RMSPropOptimizer`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_RMSPropOptimizer`
@@ -49,7 +49,7 @@ API Reference 请参考 :ref:`api_fluid_optimizer_RMSPropOptimizer`
`Adam `_ 的优化器是一种自适应调整学习率的方法,
适用于大多非 `凸优化 `_ 、大数据集和高维空间的场景。在实际应用中,:code:`Adam` 是最为常用的一种优化方法。
-API Reference 请参考 :ref:`api_fluid_optimizer_AdamOptimizer`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_AdamOptimizer`
@@ -58,7 +58,7 @@ API Reference 请参考 :ref:`api_fluid_optimizer_AdamOptimizer`
`Adamax `_ 是 :code:`Adam` 算法的一个变体,对学习率的上限提供了一个更简单的范围,使学习率的边界范围更简单。
-API Reference 请参考 :ref:`api_fluid_optimizer_AdamaxOptimizer`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_AdamaxOptimizer`
@@ -67,7 +67,7 @@ API Reference 请参考 :ref:`api_fluid_optimizer_AdamaxOptimizer`
`DecayedAdagrad `_ 优化器,可以看做是引入了衰减速率的 :code:`Adagrad` 算法,解决使用Adagrad后,模型训练中后期学习率急剧下降的问题。
-API Reference 请参考 :ref:`api_fluid_optimizer_DecayedAdagrad`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_DecayedAdagrad`
@@ -78,7 +78,7 @@ API Reference 请参考 :ref:`api_fluid_optimizer_DecayedAdagrad`
`FtrlOptimizer `_ 优化器结合了 `FOBOS算法 `_ 的高精度与 `RDA算法
`_ 的稀疏性,是目前效果非常好的一种 `Online Learning `_ 算法。
-API Reference 请参考 :ref:`api_fluid_optimizer_FtrlOptimizer`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_FtrlOptimizer`
@@ -87,6 +87,6 @@ API Reference 请参考 :ref:`api_fluid_optimizer_FtrlOptimizer`
:code:`ModelAverage` 优化器,在训练中通过窗口来累计历史 parameter,在预测时使用取平均值后的paramet,整体提高预测的精度。
-API Reference 请参考 :ref:`api_fluid_optimizer_ModelAverage`
+API Reference 请参考 :ref:`cn_api_fluid_optimizer_ModelAverage`
diff --git a/doc/fluid/api_cn/api_guides/low_level/parallel_executor.rst b/doc/fluid/api_cn/api_guides/low_level/parallel_executor.rst
index f269bc02ccb0c95581ce3656bda1e0c6e17f8128..6adb87b6ebf858fa4c0ba6d0cab822d77e4eaf2a 100644
--- a/doc/fluid/api_cn/api_guides/low_level/parallel_executor.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/parallel_executor.rst
@@ -7,7 +7,7 @@
:code:`ParallelExecutor` 是以数据并行的方式在多个节点上分别执行 :code:`Program` 的执行器。用户可以通过Python脚本驱动 :code:`ParallelExecutor` 执行, :code:`ParallelExecutor` 的执行过程:
-- 首先根据 :code:`Program` 、 :code:`GPU` 卡的数目(或者 :code:`CPU` 的核数)以及 :ref:`api_fluid_BuildStrategy` 构建 :code:`SSA Graph` 和一个线程池;
+- 首先根据 :code:`Program` 、 :code:`GPU` 卡的数目(或者 :code:`CPU` 的核数)以及 :ref:`cn_api_fluid_BuildStrategy` 构建 :code:`SSA Graph` 和一个线程池;
- 执行过程中,根据Op的输入是否Ready决定是否执行该Op,这样可以使没有相互依赖的多个Op可在线程池中并行执行;
:code:`ParallelExecutor` 在构造时需要指定当前 :code:`Program` 的设备类型, :code:`GPU` 或者 :code:`CPU` :
@@ -25,13 +25,13 @@
* :code:`AllReduce` 模式下, :code:`ParallelExecutor` 调用AllReduce操作使多个节点上参数梯度完全相等,然后各个节点独立进行参数的更新;
* :code:`Reduce` 模式下, :code:`ParallelExecutor` 会预先将所有参数的更新分派到不同的节点上,在执行过程中 :code:`ParallelExecutor` 调用Reduce操作将参数梯度在预先指定的节点上进行聚合,并进行参数更新,最后调用Broadcast操作将更新后的参数发送到其他节点。
-这两种模式通过 :code:`build_strategy` 来指定,使用方法,请参考 :ref:`api_fluid_BuildStrategy` 。
+这两种模式通过 :code:`build_strategy` 来指定,使用方法,请参考 :ref:`cn_api_fluid_BuildStrategy` 。
**注意** :如果在Reduce模式下使用 :code:`CPU` 多线程执行 :code:`Program` , :code:`Program` 的参数在多个线程间是共享的,在某些模型上,Reduce模式可以大幅节省内存。
-由于模型的执行速度与模型结构和执行器的执行策略相关, :code:`ParallelExecutor` 允许用户修改执行器的相关参数,如:线程池大小( :code:`num_threads` )、多少次迭代之后清理一次临时变量 :code:`num_iteration_per_drop_scope` 等,更多信息请参考 :ref:`api_fluid_ExecutionStrategy` >。
+由于模型的执行速度与模型结构和执行器的执行策略相关, :code:`ParallelExecutor` 允许用户修改执行器的相关参数,如:线程池大小( :code:`num_threads` )、多少次迭代之后清理一次临时变量 :code:`num_iteration_per_drop_scope` 等,更多信息请参考 :ref:`cn_api_fluid_ExecutionStrategy` >。
- 相关API汇总:
- - :ref:`api_fluid_ParallelExecutor`
- - :ref:`api_fluid_BuildStrategy`
- - :ref:`api_fluid_ExecutionStrategy`
\ No newline at end of file
+ - :ref:`cn_api_fluid_ParallelExecutor`
+ - :ref:`cn_api_fluid_BuildStrategy`
+ - :ref:`cn_api_fluid_ExecutionStrategy`
\ No newline at end of file
diff --git a/doc/fluid/api_cn/api_guides/low_level/parameter.rst b/doc/fluid/api_cn/api_guides/low_level/parameter.rst
old mode 100755
new mode 100644
index b485fa4743e00866804917aed039b64eaddc0d01..e28215422ae511a4ecb2765d048f4fa5312fefa0
--- a/doc/fluid/api_cn/api_guides/low_level/parameter.rst
+++ b/doc/fluid/api_cn/api_guides/low_level/parameter.rst
@@ -4,7 +4,7 @@
模型参数
#########
-模型参数为模型中的weight和bias统称,在fluid中对应fluid.Parameter类,继承自fluid.Variable,是一种可持久化的variable。模型的训练就是不断学习更新模型参数的过程。模型参数相关的属性可以通过 :ref:`api_fluid_param_attr_ParamAttr` 来配置,可配置内容有:
+模型参数为模型中的weight和bias统称,在fluid中对应fluid.Parameter类,继承自fluid.Variable,是一种可持久化的variable。模型的训练就是不断学习更新模型参数的过程。模型参数相关的属性可以通过 :ref:`cn_api_fluid_param_attr_ParamAttr` 来配置,可配置内容有:
- 初始化方式
- 正则化
@@ -33,7 +33,7 @@ fluid通过设置 :code:`ParamAttr` 的 :code:`initializer` 属性为单个param
可用别名:Bilinear
-API请参考::ref:`api_fluid_initializer_BilinearInitializer`
+API请参考::ref:`cn_api_fluid_initializer_BilinearInitializer`
2. ConstantInitializer
----------------------
@@ -42,7 +42,7 @@ API请参考::ref:`api_fluid_initializer_BilinearInitializer`
可用别名:Constant
-API请参考::ref:`api_fluid_initializer_ConstantInitializer`
+API请参考::ref:`cn_api_fluid_initializer_ConstantInitializer`
3. MSRAInitializer
------------------
@@ -51,7 +51,7 @@ API请参考::ref:`api_fluid_initializer_ConstantInitializer`
可用别名:MSRA
-API请参考::ref:`api_fluid_initializer_MSRAInitializer`
+API请参考::ref:`cn_api_fluid_initializer_MSRAInitializer`
4. NormalInitializer
---------------------
@@ -60,7 +60,7 @@ API请参考::ref:`api_fluid_initializer_MSRAInitializer`
可用别名:Normal
-API请参考::ref:`api_fluid_initializer_NormalInitializer`
+API请参考::ref:`cn_api_fluid_initializer_NormalInitializer`
5. TruncatedNormalInitializer
-----------------------------
@@ -69,7 +69,7 @@ API请参考::ref:`api_fluid_initializer_NormalInitializer`
可用别名:TruncatedNormal
-API请参考::ref:`api_fluid_initializer_TruncatedNormalInitializer`
+API请参考::ref:`cn_api_fluid_initializer_TruncatedNormalInitializer`
6. UniformInitializer
--------------------
@@ -78,7 +78,7 @@ API请参考::ref:`api_fluid_initializer_TruncatedNormalInitializer`
可用别名:Uniform
-API请参考::ref:`api_fluid_initializer_UniformInitializer`
+API请参考::ref:`cn_api_fluid_initializer_UniformInitializer`
7. XavierInitializer
--------------------
@@ -87,7 +87,7 @@ API请参考::ref:`api_fluid_initializer_UniformInitializer`
可用别名:Xavier
-API请参考::ref:`api_fluid_initializer_XavierInitializer`
+API请参考::ref:`cn_api_fluid_initializer_XavierInitializer`
正则化方式
=============
@@ -102,8 +102,8 @@ fluid通过设置 :code:`ParamAttr` 的 :code:`regularizer` 属性为单个param
以下为fluid支持的正则化方式:
-- :ref:`api_fluid_regularizer_L1DecayRegularizer` (别名:L1Decay)
-- :ref:`api_fluid_regularizer_L2DecayRegularizer` (别名:L2Decay)
+- :ref:`cn_api_fluid_regularizer_L1DecayRegularizer` (别名:L1Decay)
+- :ref:`cn_api_fluid_regularizer_L2DecayRegularizer` (别名:L2Decay)
Clipping
==========
@@ -124,14 +124,14 @@ fluid通过设置 :code:`ParamAttr` 的 :code:`gradient_clip` 属性为单个par
用来将一个tensor的值clipping到指定范围。
-API请参考::ref:`api_fluid_clip_ErrorClipByValue`
+API请参考::ref:`cn_api_fluid_clip_ErrorClipByValue`
2. GradientClipByGlobalNorm
---------------------------
用来将多个Tensor的global-norm限制在 :code:`clip_norm` 以内。
-API请参考::ref:`api_fluid_clip_GradientClipByGlobalNorm`
+API请参考::ref:`cn_api_fluid_clip_GradientClipByGlobalNorm`
3. GradientClipByNorm
---------------------
@@ -139,14 +139,14 @@ API请参考::ref:`api_fluid_clip_GradientClipByGlobalNorm`
将Tensor的l2-norm限制在 :code:`max_norm` 以内。如果Tensor的l2-norm超过了 :code:`max_norm` ,
会将计算出一个 :code:`scale` ,该Tensor的所有值乘上计算出来的 :code:`scale` .
-API请参考::ref:`api_fluid_clip_GradientClipByNorm`
+API请参考::ref:`cn_api_fluid_clip_GradientClipByNorm`
4. GradientClipByValue
----------------------
将parameter对应的gradient的值限制在[min, max]范围内。
-API请参考::ref:`api_fluid_clip_GradientClipByValue`
+API请参考::ref:`cn_api_fluid_clip_GradientClipByValue`
模型平均
========
@@ -164,4 +164,4 @@ fluid通过 :code:`ParamAttr` 的 :code:`do_model_average` 属性设置单个par
平均后的parameters只是被用来进行测试和预测,其并不参与实际的训练过程。
-具体API请参考::ref:`api_fluid_optimizer_ModelAverage`
+具体API请参考::ref:`cn_api_fluid_optimizer_ModelAverage`
diff --git a/doc/fluid/api_cn/clip_cn.rst b/doc/fluid/api_cn/clip_cn.rst
index 4de9347b8da7604d1300970420b54603bb8805d6..70b4e6e99e17bfe15b80e6d9970e151b4716aea5 100644
--- a/doc/fluid/api_cn/clip_cn.rst
+++ b/doc/fluid/api_cn/clip_cn.rst
@@ -108,12 +108,12 @@ GradientClipByNorm
.. code-block:: python
- w_param_attrs = ParamAttr(name=None,
- initializer=UniformInitializer(low=-1.0, high=1.0, seed=0),
+ w_param_attrs = fluid.ParamAttr(name=None,
+ initializer=fluid.initializer.UniformInitializer(low=-1.0, high=1.0, seed=0),
learning_rate=1.0,
- regularizer=L1Decay(1.0),
+ regularizer=fluid.regularizer.L1Decay(1.0),
trainable=True,
- clip=GradientClipByNorm(clip_norm=2.0))
+ clip=fluid.clip.GradientClipByNorm(clip_norm=2.0))
y_predict = fluid.layers.fc(input=x, size=1, param_attr=w_param_attrs)
@@ -147,12 +147,12 @@ GradientClipByValue
.. code-block:: python
- w_param_attrs = ParamAttr(name=None,
- initializer=UniformInitializer(low=-1.0, high=1.0, seed=0),
+ w_param_attrs = fluid.ParamAttr(name=None,
+ initializer=fluid.initializer.UniformInitializer(low=-1.0, high=1.0, seed=0),
learning_rate=1.0,
- regularizer=L1Decay(1.0),
+ regularizer=fluid.regualrizer.L1Decay(1.0),
trainable=True,
- clip=GradientClipByValue(-1.0, 1.0))
+ clip=fluid.clip.GradientClipByValue(-1.0, 1.0))
y_predict = fluid.layers.fc(input=x, size=1, param_attr=w_param_attrs)
diff --git a/doc/fluid/api_cn/executor_cn.rst b/doc/fluid/api_cn/executor_cn.rst
index 595fc0aed2077e0a982045799515ed6af8e50a08..8354f203b131ed01dadb71830666d29d377a1306 100644
--- a/doc/fluid/api_cn/executor_cn.rst
+++ b/doc/fluid/api_cn/executor_cn.rst
@@ -81,10 +81,11 @@ feed map为该program提供输入数据。fetch_list提供program训练结束后
.. code-block:: python
- data = layers.data(name='X', shape=[1], dtype='float32')
- hidden = layers.fc(input=data, size=10)
- layers.assign(hidden, out)
- loss = layers.mean(out)
+ data = fluid.layers.data(name='X', shape=[1], dtype='float32')
+ out = fluid.layers.create_tensor(dtype='float32')
+ hidden = fluid.layers.fc(input=data, size=10)
+ fluid.layers.assign(hidden, out)
+ loss = fluid.layers.mean(out)
adam = fluid.optimizer.Adam()
adam.minimize(loss)
@@ -93,8 +94,8 @@ feed map为该program提供输入数据。fetch_list提供program训练结束后
cpu = core.CPUPlace()
- exe = Executor(cpu)
- exe.run(default_startup_program())
+ exe = fluid.Executor(cpu)
+ exe.run(fluid.default_startup_program())
.. code-block:: python
diff --git a/doc/fluid/api_cn/fluid_cn.rst b/doc/fluid/api_cn/fluid_cn.rst
index 813216b0deeda5bb6d18044cd19ae0089362c0e3..2bf0c08ad190f856d1f05f0417f5fd189fa3b3c9 100644
--- a/doc/fluid/api_cn/fluid_cn.rst
+++ b/doc/fluid/api_cn/fluid_cn.rst
@@ -1060,12 +1060,12 @@ name_scope
.. code-block:: python
- with name_scope("encoder"):
- ...
- with name_scope("decoder"):
- ...
- with name_scope("attention"):
- ...
+ with name_scope("encoder"):
+ ...
+ with name_scope("decoder"):
+ ...
+ with name_scope("attention"):
+ ...
diff --git a/doc/fluid/api_cn/index_cn.rst b/doc/fluid/api_cn/index_cn.rst
index ee9689c3f28842e17f2791e0a41c9328fa729ab4..21c1ac5510e8533f6acc78f749acf53fad1c31e4 100644
--- a/doc/fluid/api_cn/index_cn.rst
+++ b/doc/fluid/api_cn/index_cn.rst
@@ -1,6 +1,6 @@
-=============
-API Reference
-=============
+=====
+API
+=====
.. toctree::
:maxdepth: 1
@@ -12,12 +12,11 @@ API Reference
clip_cn.rst
data_feeder_cn.rst
executor_cn.rst
- index_cn.rst
initializer_cn.rst
io_cn.rst
layers_cn.rst
metrics_cn.rst
- net_cn.rst
+ nets_cn.rst
optimizer_cn.rst
param_attr_cn.rst
profiler_cn.rst
diff --git a/doc/fluid/api_cn/layers_cn.rst b/doc/fluid/api_cn/layers_cn.rst
index 73fc9c1f1869000be1834309c51bc8abe7a58c5d..b365c380c32cbc966fca9fd6d2b9866e26995566 100644
--- a/doc/fluid/api_cn/layers_cn.rst
+++ b/doc/fluid/api_cn/layers_cn.rst
@@ -20,11 +20,12 @@ array_length
此功能用于查找输入数组LOD_TENSOR_ARRAY的长度。
相关API:
- - :ref:`api_fluid_layers_array_read`
- - :ref:`api_fluid_layers_array_write`
- - :ref:`api_fluid_layers_While`
+ - :ref:`cn_api_fluid_layers_array_read`
+ - :ref:`cn_api_fluid_layers_array_write`
+ - :ref:`cn_api_fluid_layers_While`
-参数:**array** (LOD_TENSOR_ARRAY)-输入数组,用来计算数组长度
+参数:
+ - **array** (LOD_TENSOR_ARRAY)-输入数组,用来计算数组长度
返回:输入数组LoDTensorArray的长度
@@ -201,6 +202,9 @@ memory用于缓存分段数据。memory的初始值可以是零,也可以是
动态RNN可以将多个变量标记为其输出。使用drnn()获得输出序列。
+.. note::
+ 目前不支持在DynamicRNN中任何层上配置 is_sparse = True
+
.. py:method:: step_input(x)
将序列标记为动态RNN输入。
@@ -396,12 +400,15 @@ increment
.. py:function:: paddle.fluid.layers.increment(x, value=1.0, in_place=True)
-该函数为输入 ``x`` 中的每一个值增加 ``value`` 大小, ``value`` 即函数中待传入的参数。该函数默认直接在原变量 ``x`` 上进行运算。
-
+该函数为输入 ``x`` 增加 ``value`` 大小, ``value`` 即函数中待传入的参数。该函数默认直接在原变量 ``x`` 上进行运算。
+
+.. note::
+ ``x`` 中元素个数必须为1
+
参数:
- **x** (Variable|list) – 含有输入值的张量(tensor)
- **value** (float) – 需要增加在 ``x`` 变量上的值
- - **in_place** (bool) – 是否在 ``x`` 变量本身进行增加操作,而非返回其增加后的一个副本而本身不改变。默认为True, 即在其本身进行操作。
+ - **in_place** (bool) – 判断是否在x变量本身执行操作,True原地执行,False时,返回增加后的副本
返回: 每个元素增加后的对象
@@ -411,7 +418,8 @@ increment
.. code-block:: python
- data = fluid.layers.data(name='data', shape=[32, 32], dtype='float32')
+ data = fluid.layers.data(name='data', shape=[1], dtype='float32',
+ append_batch_size=False)
data = fluid.layers.increment(x=data, value=3.0, in_place=True)
@@ -850,7 +858,7 @@ data
2.如果维度shape包含-1,比如shape=[-1,1],
“append_batch_size则为False(表示无效)”
- - **dtype** (int|float)-数据类型:float32,float_16,int等
+ - **dtype** (basestring)-数据类型:float32,float_16,int等
- **type** (VarType)-输出类型。默认为LOD_TENSOR
- **lod_level** (int)-LoD层。0表示输入数据不是一个序列
- **stop_gradient** (bool)-布尔类型,提示是否应该停止计算梯度
@@ -1214,7 +1222,7 @@ read_file
reader也是变量。可以为由fluid.layers.open_files()生成的原始reader或者由fluid.layers.double_buffer()生成的装饰变量,等等。
参数:
- **reader** (Variable)-将要执行的reader
+ - **reader** (Variable)-将要执行的reader
返回:从给定的reader中读取数据
@@ -1246,13 +1254,14 @@ shuffle
.. py:function:: paddle.fluid.layers.shuffle(reader, buffer_size)
-使用python装饰器用shuffle 装饰 reader
+创建一个特殊的数据读取器,它的输出数据会被重洗(shuffle)。由原始读取器创建的迭代器得到的输出将会被暂存到shuffle缓存区,其后
+会对其进行重洗运算。shuffle缓存区的大小由参数 ``buffer_size`` 决定。
参数:
- **reader** (Variable) – 用shuffle装饰的reader
- **buffer_size** (int) – reader中buffer的大小
-返回:用shuffle装饰后的reader
+返回:其输出会被重洗的一个reader(读取器)
返回类型:Variable
@@ -1714,7 +1723,12 @@ BRelu 激活函数
- **name** (str|None) - 该层的名称(可选)。如果设置为None,该层将被自动命名
+**代码示例:**
+
+.. code-block:: python
+ x = fluid.layers.data(name="x", shape=[2,3,16,16], dtype=”float32”)
+ y = fluid.layers.brelu(x, t_min=1.0, t_max=20.0)
@@ -1826,7 +1840,7 @@ clip
clip算子
-clip运算符限制给定输入的值在一个区间内。间隔使用参数“min”和“max”来指定:公式为
+clip运算符限制给定输入的值在一个区间内。间隔使用参数"min"和"max"来指定:公式为
.. math::
Out=min(max(X,min),max)
@@ -1841,9 +1855,13 @@ clip运算符限制给定输入的值在一个区间内。间隔使用参数“m
返回类型: 输出(Variable)。
+**代码示例:**
+.. code-block:: python
-
+ input = fluid.layers.data(
+ name='data', shape=[1], dtype='float32')
+ reward = fluid.layers.clip(x=input, min=-1.0, max=1.0)
@@ -1866,13 +1884,6 @@ ClipByNorm算子
其中, :math:`norm(X)` 代表 ``x`` 的L2范数。
-例如,
-
-.. code-block:: python
-
- data = fluid.layer.data( name=’data’, shape=[2, 4, 6], dtype=’float32’)
- reshaped = fluid.layers.clip_by_norm( x=data, max_norm=0.5)
-
参数:
- **x** (Variable)- (Tensor) clip_by_norm运算的输入,维数必须在[1,9]之间。
@@ -1883,7 +1894,13 @@ ClipByNorm算子
返回类型: Variable
+**代码示例:**
+
+.. code-block:: python
+ input = fluid.layers.data(
+ name='data', shape=[1], dtype='float32')
+ reward = fluid.layers.clip_by_norm(x=input, max_norm=1.0)
@@ -2484,16 +2501,15 @@ ctc_greedy_decoder
.. py:function:: paddle.fluid.layers.ctc_greedy_decoder(input, blank, name=None)
此op用于贪婪策略解码序列,步骤如下:
-
- 1. 获取输入中的每一行的最大值索引。又名numpy.argmax(input, axis=0)。
- 2. 对于step1结果中的每个序列,在两个空格之间合并重复token并删除所有空格。
+ 1. 获取输入中的每一行的最大值索引,也就是numpy.argmax(input, axis=0)。
+ 2. 对于step1结果中的每个序列,在两个空格之间合并重复部分(即合并重复的上一步中的到的索引值)并删除所有空格。
-A simple example as below:
+简单举一个例子,
- ::
+::
- Given:
+ 已知:
input.data = [[0.6, 0.1, 0.3, 0.1],
[0.3, 0.2, 0.4, 0.1],
@@ -2507,7 +2523,14 @@ A simple example as below:
input.lod = [[4, 4]]
- Then:
+ 计算过程:
+
+ 1. 将argmax的运算结果应用于输入的第一个序列,即 input.data[0:4] 。
+ 则得出的结果为[[0], [2], [1], [0]]
+ 2. 合并重复的索引值部分,删除空格,即为0的值。
+ 则第一个输入序列对应的输出为:[[2], [1]]
+
+ 最后
output.data = [[2],
[1],
@@ -2521,7 +2544,7 @@ A simple example as below:
- **blank** (int) — Connectionist Temporal Classification (CTC) loss空白标签索引, 属于半开区间[0,num_classes + 1)。
- **name** (str) — 此层的名称。可选。
-返回: CTC贪婪解码结果。如果结果中的所有序列都为空,则LoDTensor 为[-1],其中LoD[[]] dims[1,1]。
+返回: CTC贪婪解码结果是一个形为(Lp,1)的二维张量,其中Lp是所有输出序列的长度之和。如果结果中的所有序列都为空,则输出LoDTensor 为[-1],其中LoD[[]] 形为[1,1]。
返回类型: 变量(Variable)
@@ -2598,23 +2621,30 @@ dropout操作
丢弃或者保持x的每个元素独立。Dropout是一种正则化技术,通过在训练过程中阻止神经元节点间的联合适应性来减少过拟合。根据给定的丢弃概率dropout操作符随机将一些神经元输出设置为0,其他的仍保持不变。
参数:
- - **x** Variable)-输入张量
+ - **x** (Variable)-输入张量
- **dropout_prob** (float)-设置为0的单元的概率
- **is_test** (bool)-显示是否进行测试用语的标记
- **seed** (int)-Python整型,用于创建随机种子。如果该参数设为None,则使用随机种子。注:如果给定一个整型种子,始终丢弃相同的输出单元。训练过程中勿用固定不变的种子。
- **name** (str|None)-该层名称(可选)。如果设置为None,则自动为该层命名
- - **dropout_implementation** (string)-[‘downgrade_in_infer’(defauld)|’upscale_in_train’]
- 1.downgrade_in_infer(default), 在预测时减小输出结果
- train: out = input * mask
-
- inference: out = input * dropout_prob
- (mask是一个张量,维度和输入维度相同,值为0或1,值为0的比例即为dropout_prob)
- 2.upscale_in_train, 增加训练时的结果
- train: out = input * mask / ( 1.0 - dropout_prob )
-
- inference: out = input
- (make是一个张量,维度和输入维度相同,值为0或1,值为0的比例即为dropout_prob)
- dropout操作符可以从程序中移除,程序变得高效。
+ - **dropout_implementation** (string) - [‘downgrade_in_infer’(defauld)|’upscale_in_train’]
+ 其中:
+ 1.downgrade_in_infer(default), 在预测时减小输出结果
+
+ train: out = input * mask
+
+ inference: out = input * dropout_prob
+
+ (mask是一个张量,维度和输入维度相同,值为0或1,值为0的比例即为 ``dropout_prob`` )
+
+ 2.upscale_in_train, 增加训练时的结果
+
+ train: out = input * mask / ( 1.0 - dropout_prob )
+
+ inference: out = input
+
+ (make是一个张量,维度和输入维度相同,值为0或1,值为0的比例即为 ``dropout_prob`` )
+
+dropout操作符可以从程序中移除,程序变得高效。
返回:带有x维的张量
@@ -2698,7 +2728,7 @@ dynamic_gru
emb = fluid.layers.embedding(input=data, size=[dict_dim, emb_dim])
hidden_dim = 512
x = fluid.layers.fc(input=emb, size=hidden_dim * 3)
- hidden = fluid.layers.dynamic_gru(input=x, dim=hidden_dim)
+ hidden = fluid.layers.dynamic_gru(input=x, size=hidden_dim)
@@ -2951,8 +2981,8 @@ edit_distance
.. code-block:: python
- x = fluid.layers.data(name='x', shape=[8], dtype='float32')
- y = fluid.layers.data(name='y', shape=[7], dtype='float32')
+ x = fluid.layers.data(name='x', shape=[1], dtype='float32')
+ y = fluid.layers.data(name='y', shape=[1], dtype='float32')
cost = fluid.layers.edit_distance(input=x,label=y)
@@ -3387,7 +3417,12 @@ ELU激活层(ELU Activation Operator)
返回类型: 输出(Variable)
+**代码示例:**
+
+.. code-block:: python
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
+ y = fluid.layers.elu(x, alpha=0.2)
@@ -3953,7 +3988,12 @@ sigmoid的分段线性逼近(https://arxiv.org/abs/1603.00391),比sigmoid快
- **name** (str|None) - 这个层的名称(可选)。如果设置为None,该层将被自动命名。
+**代码示例:**
+.. code-block:: python
+
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
+ y = fluid.layers.hard_sigmoid(x, slope=0.3, offset=0.8)
@@ -4038,23 +4078,41 @@ hash
hsigmoid
-------------------------------
-.. py:function:: paddle.fluid.layers.hsigmoid(input, label, num_functiones, param_attr=None, bias_attr=None, name=None)
+.. py:function:: paddle.fluid.layers.hsigmoid(input, label, num_functiones, param_attr=None, bias_attr=None, name=None, path_table=None, path_code=None, is_custom=False, is_sparse=False)
-层次sigmod( hierarchical sigmoid )加速语言模型的训练过程。这个operator将类别组织成一个完整的二叉树,每个叶节点表示一个类(一个单词),每个内部节点进行一个二分类。对于每个单词,都有一个从根到它的叶子节点的唯一路径,hsigmoid计算路径上每个内部节点的损失(cost),并将它们相加得到总损失(cost)。hsigmoid可以把时间复杂度 :math:`O(N)` 优化到 :math:`O(logN)` ,其中 :math:`N` 表示单词字典的大小。
+层次sigmod( hierarchical sigmoid )加速语言模型的训练过程。这个operator将类别组织成一个完全二叉树,也可以使用 ``is_custom`` 参数来传入自定义的树结构来实现层次化。
+
+树中每个叶节点表示一个类(一个单词),每个内部节点进行一个二分类。对于每个单词,都有一个从根到它的叶子节点的唯一路径,hsigmoid计算路径上每个内部节点的损失(cost),并将它们相加得到总损失(cost)。
+
+hsigmoid可以把时间复杂度 :math:`O(N)` 优化到 :math:`O(logN)` ,其中 :math:`N` 表示单词字典的大小。
+
+使用默认树结构,请参考 `Hierarchical Probabilistic Neural Network Language Model `_ 。
+
+若要使用自定义树结构,请设置 ``is_custom`` 值为True。但在此之前,请完成以下几步部署:
+
+1.使用自定义词典来建立二叉树,每个叶结点都应该是词典中的单词
+
+2.建立一个dict类型数据结构,来存储 **单词id -> 该单词叶结点至根节点路径** 的映射,称之为路径表 ``path_table`` 参数
+
+3.建立一个dict类型数据结构,来存储 **单词id -> 该单词叶结点至根节点路径的编码(code)** 的映射。 编码code是指每次二分类的标签,1为真,0为假
+
+4.现在我们的每个单词都已经有自己的路径和路径编码,当对于同一批输入进行操作时,你可以同时传入一批路径和路径编码进行运算。
-`请参考 Hierarchical Probabilistic Neural Network Language Model `_
-
参数:
- **input** (Variable) - 输入张量,shape为 ``[N×D]`` ,其中 ``N`` 是minibatch的大小,D是特征大小。
- **label** (Variable) - 训练数据的标签。该tensor的shape为 ``[N×1]``
- - **num_classes** (int) - 类别的数量不能少于2
+ - **num_classes** (int) - 类别的数量不能少于2。若使用默认树结构,该参数必须用户设置。当 ``is_custom=False`` 时,该项绝不能为None。反之,如果 ``is_custom=True`` ,它取值应为非叶节点的个数,来指明二分类实用的类别数目。
- **param_attr** (ParamAttr|None) - 可学习参数/ hsigmoid权重的参数属性。如果将其设置为ParamAttr的一个属性或None,则将ParamAttr设置为param_attr。如果没有设置param_attr的初始化器,那么使用用Xavier初始化。默认值:没None。
- **bias_attr** (ParamAttr|bool|None) - hsigmoid偏置的参数属性。如果设置为False,则不会向输出添加偏置。如果将其设置ParamAttr的一个属性或None,则将ParamAttr设置为bias_attr。如果没有设置bias_attr的初始化器,偏置将初始化为零。默认值:None。
- **name** (str|None) - 该layer的名称(可选)。如果设置为None,该层将被自动命名。默认值:None。
+ - **path_table** (Variable|None) – 存储每一批样本从词到根节点的路径。路径应为从叶至根方向。 ``path_table`` 和 ``path_code`` 应具有相同的形, 对于每个样本 i ,path_table[i]为一个类似np.array的结构,该数组内的每个元素都是其双亲结点权重矩阵的索引
+ - **path_code** (Variable|None) – 存储每批样本的路径编码,仍然是按从叶至根方向。各样本路径编码批都由其各祖先结点的路径编码组成
+ - **is_custom** (bool|False) – 使用用户自定义二叉树取代默认二叉树结构,如果该项为真, 请务必设置 ``path_table`` , ``path_code`` , ``num_classes`` , 否则就需要设置 num_classes
+ - **is_sparse** (bool|False) – 使用稀疏更新方式,而非密集更新。如果为真, W的梯度和输入梯度将会变得稀疏
+
+返回: (LoDTensor) 层次sigmod( hierarchical sigmoid) 。shape[N, 1]
- 返回: (Tensor) 层次sigmod( hierarchical sigmoid) 。shape[N, 1]
-
- 返回类型: Out
+返回类型: Out
**代码示例**
@@ -4065,7 +4123,7 @@ hsigmoid
y = fluid.layers.data(name='y', shape=[1], dtype='int64')
out = fluid.layers.hsigmoid(input=x, label=y, num_classes=6)
-
+
@@ -4173,25 +4231,36 @@ image_resize
输入张量的shape为(num_batch, channels, in_h, in_w),并且调整大小只适用于最后两个维度(高度和宽度)。
-支持重新取样方法: 双线性插值
-
+支持重新取样方法:
+
+ BILINEAR:双线性插值
+ NEAREST:最近邻插值
+
参数:
- **input** (Variable) - 图片调整层的输入张量,这是一个shape=4的张量(num_batch, channels, in_h, in_w)
- **out_shape** (list|tuple|Variable|None) - 图片调整层的输出,shape为(out_h, out_w)。默认值:None
- **scale** (float|None)-输入的高度或宽度的乘数因子 。 out_shape和scale至少要设置一个。out_shape的优先级高于scale。默认值:None
- **name** (str|None) - 该层的名称(可选)。如果设置为None,该层将被自动命名
- **resample** (str) - 重采样方法。目前只支持“双线性”。默认值:双线性插值
+ - **actual_shape** (Variable) - 可选输入,用于动态指定输出形状。如果指定actual_shape,图像将根据给定的形状调整大小,而不是根据指定形状的 :code:`out_shape` 和 :code:`scale` 进行调整。也就是说, :code:`actual_shape` 具有最高的优先级。如果希望动态指定输出形状,建议使用 :code:`actual_shape` 而不是 :code:`out_shape` 。在使用actual_shape指定输出形状时,还需要设置out_shape和scale之一,否则在图形构建阶段会出现错误。默认值:None
+
返回: 4维tensor,shape为 (num_batches, channls, out_h, out_w).
返回类型: 变量(variable)
+抛出异常:
+ - :code:`TypeError` - out_shape应该是一个列表、元组或变量。
+ - :code:`TypeError` - actual_shape应该是变量或None
+ - :code:`ValueError` - image_resize的"resample"只能是"BILINEAR"或"NEAREST"。
+ - :code:`ValueError` - out_shape 和 scale 不能为 None
+ - :code:`ValueError` - out_shape 的长度必须为 2
**代码示例**
.. code-block:: python
- out = fluid.layers.image_resize(input, out_shape=[12, 12])
+ out = fluid.layers.image_resize(input, out_shape=[12, 12], resample="NEAREST")
@@ -4396,7 +4465,12 @@ LeakyRelu 激活函数
- **alpha** (FLOAT|0.02) - 负斜率,值很小。
- **name** (str|None) - 此层的名称(可选)。如果设置为None,该层将被自动命名。
+**代码示例:**
+.. code-block:: python
+
+ x = fluid.layers.data(name="x", shape=[2,3,16,16], dtype="float32")
+ y = fluid.layers.leaky_relu(x, alpha=0.01)
@@ -4670,6 +4744,16 @@ logical_and算子
返回类型: 输出(Variable)。
+**代码示例:**
+
+.. code-block:: python
+
+ left = fluid.layers.data(
+ name='left', shape=[1], dtype='int32')
+ right = fluid.layers.data(
+ name='right', shape=[1], dtype='int32')
+ result = fluid.layers.logical_and(x=left, y=right)
+
@@ -4702,7 +4786,13 @@ logical_not算子
返回类型: 输出(Variable)。
+**代码示例:**
+.. code-block:: python
+
+ left = fluid.layers.data(
+ name='left', shape=[1], dtype='int32')
+ result = fluid.layers.logical_not(x=left)
@@ -4736,7 +4826,15 @@ logical_or算子
+**代码示例:**
+
+.. code-block:: python
+ left = fluid.layers.data(
+ name='left', shape=[1], dtype='int32')
+ right = fluid.layers.data(
+ name='right', shape=[1], dtype='int32')
+ result = fluid.layers.logical_or(x=left, y=right)
@@ -4769,7 +4867,15 @@ logical_xor算子
+**代码示例:**
+.. code-block:: python
+
+ left = fluid.layers.data(
+ name='left', shape=[1], dtype='int32')
+ right = fluid.layers.data(
+ name='right', shape=[1], dtype='int32')
+ result = fluid.layers.logical_xor(x=left, y=right)
@@ -5320,7 +5426,7 @@ multiplex
**代码示例**
.. code-block:: python
-
+
import paddle.fluid as fluid
x1 = fluid.layers.data(name='x1', shape=[4], dtype='float32')
@@ -5342,7 +5448,7 @@ multiplex
nce
-------------------------------
-.. py:function:: paddle.fluid.layers.nce(input, label, num_total_functiones, sample_weight=None, param_attr=None, bias_attr=None, num_neg_samples=None, name=None)
+.. py:function:: paddle.fluid.layers.nce(input, label, num_total_functiones, sample_weight=None, param_attr=None, bias_attr=None, num_neg_samples=None, name=None, sampler='uniform', custom_dist=None, seed=0, is_sparse=False)
计算并返回噪音对比估计( noise-contrastive estimation training loss)。
`请参考 See Noise-contrastive estimation: A new estimation principle for unnormalized statistical models
@@ -5350,14 +5456,18 @@ nce
该operator默认使用均匀分布进行抽样。
参数:
- - **input** (Variable) - 特征
- - **label** (Variable) - 标签
- - **num_total_classes** (int) - 所有样本中的类别的总数
- - **sample_weight** (Variable|None) - 存储每个样本权重,shape为[batch_size, 1]存储每个样本的权重。每个样本的默认权重为1.0
- - **param_attr** (ParamAttr|None) - 可学习参数/ nce权重的参数属性。如果它没有被设置为ParamAttr的一个属性,nce将创建ParamAttr为param_attr。如没有设置param_attr的初始化器,那么参数将用Xavier初始化。默认值:None
- - **bias_attr** (ParamAttr|bool|None) - nce偏置的参数属性。如果设置为False,则不会向输出添加偏置(bias)。如果值为None或ParamAttr的一个属性,则bias_attr=ParamAtt。如果没有设置bias_attr的初始化器,偏置将被初始化为零。默认值:None
- - **num_neg_samples** (int) - 负样例的数量。默认值是10
- - **name** (str|None) - 该layer的名称(可选)。如果设置为None,该层将被自动命名
+ - **input** (Variable) - 输入变量
+ - **label** (Variable) - 标签
+ - **num_total_classes** (int) - 所有样本中的类别的总数
+ - **sample_weight** (Variable|None) - 存储每个样本权重,shape为[batch_size, 1]存储每个样本的权重。每个样本的默认权重为1.0
+ - **param_attr** (ParamAttr|None) - :math:`可学习参数/nce权重` 的参数属性。如果它没有被设置为ParamAttr的一个属性,nce将创建ParamAttr为param_attr。如没有设置param_attr的初始化器,那么参数将用Xavier初始化。默认值:None
+ - **bias_attr** (ParamAttr|bool|None) - nce偏置的参数属性。如果设置为False,则不会向输出添加偏置(bias)。如果值为None或ParamAttr的一个属性,则bias_attr=ParamAtt。如果没有设置bias_attr的初始化器,偏置将被初始化为零。默认值:None
+ - **num_neg_samples** (int) - 负样例的数量。默认值是10
+ - **name** (str|None) - 该layer的名称(可选)。如果设置为None,该层将被自动命名
+ - **sampler** (str) – 取样器,用于从负类别中进行取样。可以是 ‘uniform’, ‘log_uniform’ 或 ‘custom_dist’。 默认 ‘uniform’
+ - **custom_dist** (float[]) – 一个 float[] 并且它的长度为 ``num_total_classes`` 。 如果取样器类别为‘custom_dist’,则使用此参数。 custom_dist[i] 是第i个类别被取样的概率。默认为 None
+ - **seed** (int) – 取样器使用的seed。默认为0
+ - **is_sparse** (bool) – 标志位,指明是否使用稀疏更新, :math:`weight@GRAD` 和 :math:`bias@GRAD` 会变为 SelectedRows
返回: nce loss
@@ -5368,28 +5478,37 @@ nce
.. code-block:: python
- window_size = 5
- words = []
- for i in xrange(window_size):
- words.append(layers.data(
- name='word_{0}'.format(i), shape=[1], dtype='int64'))
+ window_size = 5
+ words = []
+ for i in xrange(window_size):
+ words.append(layers.data(
+ name='word_{0}'.format(i), shape=[1], dtype='int64'))
+
+ dict_size = 10000
+ label_word = int(window_size / 2) + 1
- dict_size = 10000
- label_word = int(window_size / 2) + 1
+ embs = []
+ for i in xrange(window_size):
+ if i == label_word:
+ continue
- embs = []
- for i in xrange(window_size):
- if i == label_word:
- continue
+ emb = layers.embedding(input=words[i], size=[dict_size, 32],
+ param_attr='emb.w', is_sparse=True)
+ embs.append(emb)
- emb = layers.embedding(input=words[i], size=[dict_size, 32],
- param_attr='emb.w', is_sparse=True)
- embs.append(emb)
+ embs = layers.concat(input=embs, axis=1)
+ loss = layers.nce(input=embs, label=words[label_word],
+ num_total_classes=dict_size, param_attr='nce.w',
+ bias_attr='nce.b')
- embs = layers.concat(input=embs, axis=1)
- loss = layers.nce(input=embs, label=words[label_word],
- num_total_classes=dict_size, param_attr='nce.w',
- bias_attr='nce.b')
+ #使用custom distribution
+ dist = fluid.layers.assign(input=np.array([0.05,0.5,0.1,0.3,0.05]).astype("float32"))
+ loss = layers.nce(input=embs, label=words[label_word],
+ num_total_classes=5, param_attr='nce.w',
+ bias_attr='nce.b',
+ num_neg_samples=3,
+ sampler="custom_dist",
+ custom_dist=dist)
@@ -5625,7 +5744,7 @@ pad_constant_like
pool2d
-------------------------------
-.. py:function:: paddle.fluid.layers.pool2d(input, pool_size=-1, pool_type='max', pool_stride=1, pool_padding=0, global_pooling=False, use_cudnn=True, ceil_mode=False, name=None)
+.. py:function:: paddle.fluid.layers.pool2d(input, pool_size=-1, pool_type='max', pool_stride=1, pool_padding=0, global_pooling=False, use_cudnn=True, ceil_mode=False, name=None, exclusive=True)
pooling2d操作符根据 ``input`` , 池化类型 ``pool_type`` , 池化核大小 ``pool_size`` , 步长 ``pool_stride`` ,填充 ``pool_padding`` 这些参数得到输出。
@@ -5636,10 +5755,10 @@ pooling2d操作符根据 ``input`` , 池化类型 ``pool_type`` , 池化核
例如:
输入:
- X shape::math:`\left ( N,C_{in},H_{in},W_{in} \right )`
+ X shape::math:`\left ( N,C,H_{in},W_{in} \right )`
输出:
- Out shape::math:`\left ( N,C_{out},H_{out},W_{out} \right )`
+ Out shape::math:`\left ( N,C,H_{out},W_{out} \right )`
如果 ``ceil_mode`` = false:
@@ -5672,21 +5791,22 @@ pooling2d操作符根据 ``input`` , 池化类型 ``pool_type`` , 池化核
hstart &= max(0, i * strides[0] - paddings[0])\\
hend &= min(H, hstart + ksize[0]) \\
wstart &= max(0, j * strides[1] - paddings[1]) \\
- wend & = min(W, wstart + ksize[1]) Output(i ,j) \\
- & = \frac{sum(Input[hstart:hend, wstart:wend])}{(hend - hstart) * (wend - wstart)}
+ wend & = min(W, wstart + ksize[1]) \\
+ Output(i ,j) & = \frac{sum(Input[hstart:hend, wstart:wend])}{(hend - hstart) * (wend - wstart)}
参数:
- **input** (Variable) - 池化操作的输入张量。输入张量格式为NCHW,N为批尺寸,C是通道数,H是特征高度,W是特征宽度
- - **pool_size** (int) - 池化窗口的边长。如果它是一个元组或列表,它必须包含两个整数值, (pool_size_Height, pool_size_Width)。否则它应是一个整数的平方值。
+ - **pool_size** (int|list|tuple) - 池化窗口的大小。如果它是一个元组或列表,它必须包含两个整数值, (pool_size_Height, pool_size_Width)。否则它应是一个整数的平方值。
- **pool_type** (string) - 池化类型,可以是“max”对应max-pooling,“avg”对应average-pooling
- - **pool_stride** (int) - 池化层的步长。如果它是一个元组或列表,它将包含两个整数,(pool_stride_Height, pool_stride_Width)。否则它是一个整数的平方值。
- - **pool_padding** (int) - 填充大小。如果它是一个元组或列表,它必须包含两个整数值,(pool_padding_on_Height, pool_padding_on_Width)。否则它是一个整数的平方值。
- - **global_pooling** (bool,默认false)- 是否用全局池化。如果global_pooling = true,ksize和填充(padding)则被忽略
+ - **pool_stride** (int|list|tuple) - 池化层的步长。如果它是一个元组或列表,它将包含两个整数,(pool_stride_Height, pool_stride_Width)。否则它是一个整数的平方值。
+ - **pool_padding** (int|list|tuple) - 填充大小。如果它是一个元组或列表,它必须包含两个整数值,(pool_padding_on_Height, pool_padding_on_Width)。否则它是一个整数的平方值。
+ - **global_pooling** (bool,默认false)- 是否用全局池化。如果global_pooling = true, ``pool_size`` 和 ``pool_padding`` 将被忽略。
- **use_cudnn** (bool,默认false)- 只在cudnn核中用,需要下载cudnn
- **ceil_mode** (bool,默认false)- 是否用ceil函数计算输出高度和宽度。默认False。如果设为False,则使用floor函数
- **name** (str|None) - 该层名称(可选)。若设为None,则自动为该层命名。
+ - **exclusive** (bool) - 是否在平均池化模式忽略填充值。默认为True。
返回:池化结果
@@ -5723,20 +5843,21 @@ pooling2d操作符根据 ``input`` , 池化类型 ``pool_type`` , 池化核
pool3d
-------------------------------
-.. py:function:: paddle.fluid.layers.pool3d(input, pool_size=-1, pool_type='max', pool_stride=1, pool_padding=0, global_pooling=False, use_cudnn=True, ceil_mode=False, name=None)
+.. py:function:: paddle.fluid.layers.pool3d(input, pool_size=-1, pool_type='max', pool_stride=1, pool_padding=0, global_pooling=False, use_cudnn=True, ceil_mode=False, name=None, exclusive=True)
函数使用上述输入参数的池化配置,为三维空间添加池化操作
参数:
- - **input** (Vairable) - 池化的输入张量。输入张量的格式为NCHW, N是批尺寸,C是通道数,N是特征高度,W是特征宽度。
- - **pool_size** (int) - 池化窗口的边长。所有对池化窗口都是正方形,边长为pool_size。
- - **pool_type** (str) - 池化类型,``ma``对应max-pooling,``avg``对应average-pooling。
- - **pool_stride** (int) - 跨越步长
- - **pool_padding** (int) - 填充大小
- - **global_pooling** (bool) - 是否使用全局池化。如果global_pooling = true,ksize and paddings将被忽略。
- - **use_cudnn** (bool) - 是否用cudnn核,只有在cudnn库安装时有效
+ - **input** (Vairable) - 池化运算的输入张量。输入张量的格式为NCDHW, N是批尺寸,C是通道数,D是特征深度,H是特征高度,W是特征宽度。
+ - **pool_size** (int|list|tuple) - 池化窗口的大小。如果为元组类型,那么它应该是由三个整数组成:深度,高度,宽度。如果是int类型,它应该是一个整数的立方。
+ - **pool_type** (str) - 池化类型, "max" 对应max-pooling, "avg" 对应average-pooling。
+ - **pool_stride** (int|list|tuple) - 池化跨越步长。如果为元组类型,那么它应该是由三个整数组成:深度,高度,宽度。如果是int类型,它应该是一个整数的立方。
+ - **pool_padding** (int|list|tuple) - 填充大小。如果为元组类型,那么它应该是由三个整数组成:深度,高度,宽度。如果是int类型,它应该是一个整数的立方。
+ - **global_pooling** (bool) - 是否使用全局池化。如果global_pooling = true, ``pool_size`` 和 ``pool_padding`` 将被忽略。
+ - **use_cudnn** (bool) - 是否用cudnn核,只有在cudnn库安装时有效。
- **ceil_mode** (bool) - 是否用ceil函数计算输出高度和宽度。默认False。如果设为False,则使用floor函数。
- **name** (str) - 该层名称(可选)。若为空,则自动为该层命名。
+ - **exclusive** (bool) - 是否在平均池化模式忽略填充值。默认为True。
返回:pool3d层的输出
@@ -5772,7 +5893,12 @@ pow
返回类型: 输出(Variable)
+**代码示例:**
+.. code-block:: python
+
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
+ y = fluid.layers.pow(x, factor=2.0)
@@ -5880,7 +6006,7 @@ P 的取值可为: {0, 1} 或 {0, 0.5, 1}, 其中,0.5表示输入的两文
**代码示例**
.. code-block:: python
-
+
theta = fluid.layers.data(name="x", shape=[2, 3], dtype="float32")
out_shape = fluid.layers.data(name="y", shape=[-1], dtype="float32")
data = fluid.layers.affine_grid(theta, out_shape)
@@ -6199,7 +6325,12 @@ relu6激活算子(Relu6 Activation Operator)
返回类型: 输出(Variable)
+**代码示例:**
+.. code-block:: python
+
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
+ y = fluid.layers.relu6(x, threshold=6.0)
@@ -6212,10 +6343,12 @@ relu6激活算子(Relu6 Activation Operator)
reshape
-------------------------------
+.. py:function:: paddle.fluid.layers.reshape(x, shape, actual_shape=None, act=None, inplace=False, name=None)
+
保持输入张量数据不变的情况下,改变张量的形状。
-目标形状可由 ``shape`` 或 ``actual_shape`` 给出。``shape``是一个整数列表,而 ``actual_shape``是一个张量变量。
-当两个属性同时被指定时,``actual_shape``的优先级高于 ``shape``,但在编译时仍然应该正确地设置shape以保证形状推断。
+目标形状可由 ``shape`` 或 ``actual_shape`` 给出。``shape`` 是一个整数列表,而 ``actual_shape`` 是一个张量变量。
+当两个属性同时被指定时,``actual_shape`` 的优先级高于 ``shape`` ,但在编译时仍然应该正确地设置 ``shape`` 以保证形状推断。
在指定目标shape时存在一些技巧:
@@ -6238,10 +6371,10 @@ reshape
- **shape** (list) - 新的形状。新形状最多只能有一个维度为-1。
- **actual_shape** (variable) - 一个可选的输入。如果提供,则根据 ``actual_shape`` 进行 reshape,而不是指定 ``shape`` 。也就是说,actual_shape具有比shape更高的优先级。
- **act** (str) - 对reshpe后的tensor变量执行非线性激活
- - **inplace** (bool) - 如果在多个操作符中使用x,则 ``inplace``必须设置为False。如果该标志设置为True,则重用输入x进行reshape,这将改变张量变量x的形状,并可能在多个操作符中使用x时造成错误。如果为False,则保留形状x,并创建一个新的输出张量变量,该张量变量的数据是从输入x复制的,但经过了重构。
+ - **inplace** (bool) - 如果在多个操作符中使用x,则 ``inplace`` 必须设置为False。如果该标志设置为True,则重用输入x进行reshape,这将改变张量变量x的形状,并可能在多个操作符中使用x时造成错误。如果为False,则保留形状x,并创建一个新的输出张量变量,该张量变量的数据是从输入x复制的,但经过了重构。
- **name** (str) - 可选变量,此层的名称
-返回:如果 ``act`` 为 ``None``,返回reshape后的tensor变量。如果 ``inplace``为 ``False``,将返回一个新的Tensor变量,否则,将改变x自身。如果 ``act``不是 ``None``,则返回激活的张量变量。
+返回:如果 ``act`` 为 ``None``,返回reshape后的tensor变量。如果 ``inplace`` 为 ``False`` ,将返回一个新的Tensor变量,否则,将改变x自身。如果 ``act`` 不是 ``None`` ,则返回激活的张量变量。
抛出异常:``TypeError`` - 如果 actual_shape 既不是变量也不是None
@@ -6270,6 +6403,8 @@ resize_bilinear
.. py:function:: paddle.fluid.layers.resize_bilinear(input, out_shape=None, scale=None, name=None)
+根据指定的out_shape执行双线性插值调整输入大小,输出形状按优先级由actual_shape、out_shape和scale指定。
+
双线性插值是对线性插值的扩展,即二维变量方向上(如h方向和w方向)插值。关键思想是先在一个方向上执行线性插值,然后再在另一个方向上执行线性插值。
`详情请参阅维基百科 https://en.wikipedia.org/wiki/Bilinear_interpolation `_
@@ -6279,11 +6414,16 @@ resize_bilinear
- **out_shape** (Variable) - 一维张量,包含两个数。第一个数是高度,第二个数是宽度。
- **scale** (float|None) - 用于输入高度或宽度的乘数因子。out_shape和scale至少要设置一个。out_shape的优先级高于scale。默认值:None。
- **name** (str|None) - 输出变量名。
-
+ - **actual_shape** (Variable) - 可选输入,用于动态指定输出形状。如果指定actual_shape,图像将根据给定的形状调整大小,而不是根据指定形状的 :code:`out_shape` 和 :code:`scale` 进行调整。也就是说, :code:`actual_shape` 具有最高的优先级。如果希望动态指定输出形状,建议使用 :code:`actual_shape` 而不是 :code:`out_shape` 。在使用actual_shape指定输出形状时,还需要设置out_shape和scale之一,否则在图形构建阶段会出现错误。默认值:None
+
返回: 输出的维度是(N x C x out_h x out_w)
+**代码示例:**
+
+.. code-block:: python
+ out = fluid.layers.resize_bilinear(input, out_shape=[12, 12])
@@ -6412,7 +6552,7 @@ Faster-RCNN.使用了roi池化。roi关于roi池化请参考 https://stackoverfl
**代码示例**
.. code-block:: python
-
+
pool_out = fluid.layers。roi_pool(输入=x, rois=rois, 7,7,1.0)
@@ -7002,7 +7142,7 @@ sequence_mask
sequence_pad
-------------------------------
-.. py:function:: paddle.fluid.layers.sequence_pad(x,pad_value,maxlen=None)
+.. py:function:: paddle.fluid.layers.sequence_pad(x,pad_value,maxlen=None,name=None)
序列填充操作符(Sequence Pad Operator)
@@ -7012,7 +7152,6 @@ sequence_pad
::
-
例1:
给定 1-level LoDTensor
@@ -7029,6 +7168,8 @@ sequence_pad
Out.data = [[a,b,0,0],[c,d,e,0]]
Length.data = [[2],[3]]
+::
+
例2:
给定 1-level LoDTensor
@@ -7045,6 +7186,9 @@ sequence_pad
Out.data = [[[a1,a2],[b1,b2],[0,0]],[[c1,c2],[d1,d2],[e1,e2]]]
Length.data = [[2],[3]]
+
+::
+
例3:
给定 1-level LoDTensor
@@ -7061,12 +7205,14 @@ sequence_pad
Out.data = [[[a1,a2],[b1,b2],[p1,p2]],[[c1,c2],[d1,d2],[e1,e2]]]
Length.data = [[2],[3]]
+
参数:
- **x** (Vairable) - 输入变量,应包含lod信息
- **pad_value** (Variable) - 变量,存有放入填充步的值。可以是标量或tensor,维度和序列的时间步长相等。如果是标量,则自动广播到时间步长的维度
- **maxlen** (int,默认None) - 填充序列的长度。可以为空或者任意正整数。当为空时,以序列中最长序列的长度为准,其他所有序列填充至该长度。当是某个特定的正整数,最大长度必须大于最长初始序列的长度
+ - **name** (str|None) – 该层的命名(可选项)。 如果为 None, 则自动命名
-返回:填充序列批(batch)和填充前的初始长度。所有序列的长度相等
+返回:填充序列批(batch)和填充前的初始长度。所有输出序列的长度相等
返回类型:变量(Variable)
@@ -7077,8 +7223,9 @@ sequence_pad
import numpy
x = fluid.layers.data(name='y', shape=[10, 5],
- dtype='float32', lod_level=1)
- pad_value = fluid.layers.assign(input=numpy.array([0]))
+ dtype='float32', lod_level=1)
+ pad_value = fluid.layers.assign(
+ input=numpy.array([0.0], dtype=numpy.float32))
out = fluid.layers.sequence_pad(x=x, pad_value=pad_value)
@@ -7094,7 +7241,7 @@ sequence_pad
sequence_pool
-------------------------------
-.. py:function:: paddle.fluid.layers.sequence_pool(input, pool_type)
+.. py:function:: paddle.fluid.layers.sequence_pool(input, pool_type, is_test=False)
该函数为序列的池化添加操作符。将每个实例的所有时间步数特征池化,并用参数中提到的pool_type将特征运用到输入到首部。
@@ -7127,6 +7274,7 @@ sequence_pool
参数:
- **input** (variable) - 输入变量,为LoDTensor
- **pool_type** (string) - 池化类型。支持average,sum,sqrt和max
+ - **is_test** (bool, 默认为 False) - 用于区分训练模式和测试评分模式
返回:sequence pooling 变量,类型为张量(Tensor)
@@ -7215,7 +7363,7 @@ sequence_reverse
在第0维上将输入 ``x`` 的各序列倒序。
::
-
+
假设 ``x`` 是一个形为 (5,4) 的LoDTensor, lod信息为 [[0, 2, 5]],其中,
@@ -7226,7 +7374,7 @@ sequence_reverse
输出 ``Y`` 与 ``x`` 具有同样的维数和LoD信息。 于是有:
::
-
+
Y.data() = [ [5, 6, 7, 8], [1, 2, 3, 4], # 索引为0,长度为2的逆序列
[17, 18, 19, 20], [13, 14, 15, 16], [9, 10, 11, 12] # 索引为1,长度为3的逆序列
@@ -7757,7 +7905,12 @@ SoftRelu 激活函数
- **threshold** (FLOAT|40.0) - SoftRelu的阈值
- **name** (str|None) - 该层的名称(可选)。如果设置为None,该层将被自动命名
+**代码示例:**
+
+.. code-block:: python
+ x = fluid.layers.data(name=”x”, shape=[2,3,16,16], dtype=”float32”)
+ y = fluid.layers.soft_relu(x, threshold=20.0)
@@ -7816,7 +7969,7 @@ softmax操作符计算k维向量输入中所有其他维的指数和指数值的
softmax_with_cross_entropy
-------------------------------
-.. py:function:: paddle.fluid.layers.softmax_with_cross_entropy(logits, label, soft_label=False, ignore_index=-100)
+.. py:function:: paddle.fluid.layers.softmax_with_cross_entropy(logits, label, soft_label=False, ignore_index=-100, numeric_stable_mode=False, return_softmax=False)
使用softmax的交叉熵在输出层已被广泛使用。该函数计算输入张量每一行的softmax标准化值,而后计算交叉熵。通过此种方式,可以得到更具数字稳定性的梯度值。
@@ -7835,17 +7988,28 @@ softmax_with_cross_entropy
.. math::
loss_j = -\sum_{i=0}^{K}\text{label}_i\left(\text{logit}_i - \log\left(\sum_{i=0}^{K}\exp(\text{logit}_i)\right)\right), j = 1,...,K
-
-
+
+3.如果 ``numeric_stable_mode`` 为真,在通过softmax和标签计算交叉熵损失前, softmax 首先经由下式计算得出:
+
+.. math::
+ max_j &= \max_{i=0}^{K}{\text{logit}_i} \\
+ log\_max\_sum_j &= \log\sum_{i=0}^{K}\exp(logit_i - max_j)\\
+ softmax_j &= \exp(logit_j - max_j - {log\_max\_sum}_j)
+
+
参数:
- **logits** (Variable) - 未标准化(unscaled)的log概率,一个形为 N X K 的二维张量。 N是batch大小,K是类别总数
- **label** (Variable) - 2-D 张量,代表了正确标注(ground truth), 如果 ``soft_label`` 为 False,则该参数是一个形为 N X 1 的Tensor 。如果 ``soft_label`` 为 True,它是 Tensor ,形为 N X K
- **soft_label** (bool) - 是否将输入标签当作软标签。默认为False
- **ignore_index** (int) - 指明要无视的目标值,使之不对输入梯度有贡献。仅在 ``soft_label`` 为False时有效,默认为-100
+ - **numeric_stable_mode** (bool) – 标志位,指明是否使用一个具有更佳数学稳定性的算法。仅在 ``soft_label`` 为 False的GPU模式下生效. 若 ``soft_label`` 为 True 或者执行场所为CPU, 算法一直具有数学稳定性。 注意使用稳定算法时速度可能会变慢。默认为 False
+ - **return_softmax** (bool) – 标志位,指明是否额外返回一个softmax值, 同时返回交叉熵计算结果。默认为False
-返回: 交叉熵,一个形为[N x 1]的二维张量
+返回:
+ - 如果 ``return_softmax`` 为 False, 则返回交叉熵,一个形为[N x 1]的二维张量
+ - 如果 ``return_softmax`` 为 True,则返回元组 (loss, softmax) ,其中交叉熵loss为形为[N x 1]的二维张量,softmax为[N x K]的二维张量
-返回类型: Variable
+返回类型:变量或者两个变量组成的元组
**代码示例**
@@ -8111,7 +8275,12 @@ STanh 激活算子(STanh Activation Operator.)
返回类型: 输出(Variable)
+**代码示例:**
+
+.. code-block:: python
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
+ y = fluid.layers.stanh(x, scale_a=0.67, scale_b=1.72)
@@ -8168,7 +8337,12 @@ Swish 激活函数
返回类型: output(Variable)
+**代码示例:**
+
+.. code-block:: python
+ x = fluid.layers.data(name="x", shape=[3,10,32,32], dtype="float32")
+ y = fluid.layers.swish(x, beta=2.0)
@@ -8260,7 +8434,10 @@ transpose
.. code-block:: python
- x = fluid.layers.data(name='x', shape=[5, 10, 15], dtype='float32')
+ # 请使用 append_batch_size=False 来避免
+ # 在数据张量中添加多余的batch大小维度
+ x = fluid.layers.data(name='x', shape=[5, 10, 15],
+ dtype='float32', append_batch_size=False)
x_transposed = layers.transpose(x, perm=[1, 0, 2])
@@ -9489,22 +9666,22 @@ reverse
-------------------------------
.. py:function:: paddle.fluid.layers.reverse(x,axis)
-
- **reverse**
-
- 该功能将给定轴上的输入‘x’逆序
- 参数:
- - **x** (Variable)-预逆序到输入
- - **axis** (int|tuple|list)-其上元素逆序排列的轴。
-
- 返回:逆序的张量
+**reverse**
- 返回类型:变量(Variable)
+该功能将给定轴上的输入‘x’逆序
- **代码示例**:
+参数:
+ - **x** (Variable)-预逆序到输入
+ - **axis** (int|tuple|list)-其上元素逆序排列的轴。
- .. code-block:: python
+返回:逆序的张量
+
+返回类型:变量(Variable)
+
+**代码示例**:
+
+.. code-block:: python
out = fluid.layers.reverse(x=in, axis=0)
# or:
@@ -9634,6 +9811,7 @@ zeros
**代码示例**:
.. code-block:: python
+
data = fluid.layers.zeros(shape=[1], dtype='int64')
@@ -9660,12 +9838,7 @@ append_LARS
对每一层的学习率运用LARS(LAYER-WISE ADAPTIVE RATE SCALING)
-.. code-block python
-
- .. math::
- learning_rate*=local_gw_ratio * sqrt(sumsq(param))
- / (sqrt(sumsq(gradient))+ weight_decay * sqrt(sumsq(param)))
参数:
- **learning_rate** -变量学习率。LARS的全局学习率。
@@ -9673,7 +9846,12 @@ append_LARS
返回: 衰减的学习率
+**代码示例** :
+.. code-block:: python
+
+ learning_rate*=local_gw_ratio * sqrt(sumsq(param))
+ / (sqrt(sumsq(gradient))+ weight_decay * sqrt(sumsq(param)))
@@ -10355,9 +10533,9 @@ generate_proposals
.. py:function:: paddle.fluid.layers.generate_proposals(scores, bbox_deltas, im_info, anchors, variances, pre_nms_top_n=6000, post_nms_top_n=1000, nms_thresh=0.5, min_size=0.1, eta=1.0, name=None)
-生成proposal标签的Faster-RCNN
+生成proposal的Faster-RCNN
-该操作根据每个框的概率为foreground对象,并且可以通过锚(anchors)来计算框来产生RoI。Bbox_deltais和一个objects的分数作为是RPN的输出。最终 ``proposals`` 可用于训练检测网络。
+该操作根据每个框为foreground(前景)对象的概率,并且通过锚(anchors)来计算这些框,进而提出RoI。Bbox_deltais和一个objects的分数作为是RPN的输出。最终 ``proposals`` 可用于训练检测网络。
为了生成 ``proposals`` ,此操作执行以下步骤:
@@ -10406,7 +10584,6 @@ iou_similarity
计算两个框列表的intersection-over-union(IOU)。框列表‘X’应为LoDTensor,‘Y’是普通张量,X成批输入的所有实例共享‘Y’中的框。给定框A和框B,IOU的运算如下:
.. math::
-
IOU(A, B) = \frac{area(A\cap B)}{area(A)+area(B)-area(A\cap B)}
参数:
@@ -10629,11 +10806,11 @@ rpn_target_assign
对于给定anchors和真实框之间的IoU重叠,该层可以为每个anchors做分类和回归,这些target labels用于训练RPN。classification targets是二进制的类标签(是或不是对象)。根据Faster-RCNN的论文,positive labels有两种anchors:
- (i)anchor/anchors与真实框具有最高IoU重叠;
-
- (ii)具有IoU重叠的anchors高于带有任何真实框(ground-truth box)的rpn_positive_overlap0(0.7)。
-
- 请注意,单个真实框(ground-truth box)可以为多个anchors分配正标签。对于所有真实框(ground-truth box),非正向锚是指其IoU比率低于rpn_negative_overlap(0.3)。既不是正也不是负的anchors对训练目标没有价值。回归目标是与positive anchors相关联而编码的图片真实框。
+(i) anchor/anchors与真实框具有最高IoU重叠;
+
+(ii) 具有IoU重叠的anchors高于带有任何真实框(ground-truth box)的rpn_positive_overlap0(0.7)。
+
+请注意,单个真实框(ground-truth box)可以为多个anchors分配正标签。对于所有真实框(ground-truth box),非正向锚是指其IoU比率低于rpn_negative_overlap(0.3)。既不是正也不是负的anchors对训练目标没有价值。回归目标是与positive anchors相关联而编码的图片真实框。
参数:
- **bbox_pred** (Variable)- 是一个shape为[N,M,4]的3-D Tensor,表示M个边界框的预测位置。N是批量大小,每个边界框有四个坐标值,即[xmin,ymin,xmax,ymax]。
@@ -10649,7 +10826,13 @@ rpn_target_assign
- **rpn_positive_overlap** (float)- 对于一个正例的(anchor, gt box)对,是允许anchors和所有真实框之间最小重叠的。
- **rpn_negative_overlap** (float)- 对于一个反例的(anchor, gt box)对,是允许anchors和所有真实框之间最大重叠的。
-返回: 返回元组(predict_scores,predict_location,target_label,target_bbox)。predict_scores和predict_location是RPN的预测结果。 target_label和target_bbox分别是ground-truth。 predict_location是一个shape为[F,4]的2D Tensor, ``target_bbox`` 的shape与 ``predict_location`` 的shape相同,F是foreground anchors的数量。 ``predict_scores`` 是一个shape为[F + B,1]的2D Tensor, ``target_label`` 的shape与 ``predict_scores`` 的shape相同,B是background anchors的数量,F和B取决于此算子的输入。
+返回:
+
+返回元组 (predicted_scores, predicted_location, target_label, target_bbox, bbox_inside_weight) :
+ - **predicted_scores** 和 **predicted_location** 是RPN的预测结果。 **target_label** 和 **target_bbox** 分别是真实准确数据(ground-truth)。
+ - **predicted_location** 是一个形为[F,4]的2D Tensor, **target_bbox** 的形与 **predicted_location** 相同,F是foreground anchors的数量。
+ - **predicted_scores** 是一个shape为[F + B,1]的2D Tensor, **target_label** 的形与 **predict_scores** 的形相同,B是background anchors的数量,F和B取决于此算子的输入。
+ - **Bbox_inside_weight** 标志着predicted_loction是否为fake_fg(假前景),其形为[F,4]。
返回类型: 元组(tuple)
@@ -10666,7 +10849,7 @@ rpn_target_assign
append_batch_size=False, dtype=’float32’)
gt_boxes = layers.data(name=’gt_boxes’, shape=[10, 4],
append_batch_size=False, dtype=’float32’)
- loc_pred, score_pred, loc_target, score_target =
+ loc_pred, score_pred, loc_target, score_target, bbox_inside_weight=
fluid.layers.rpn_target_assign(bbox_pred=bbox_pred,
cls_logits=cls_logits, anchor_box=anchor_box, gt_boxes=gt_boxes)
@@ -10900,8 +11083,9 @@ auc
有两种可能的曲线:
- 1. ROC:受试者工作特征曲线
- 2. PR:准确率召回率曲线
+1. ROC:受试者工作特征曲线
+
+2. PR:准确率召回率曲线
参数:
- **input** (Variable) - 浮点二维变量,值的范围为[0,1]。每一行降序排列。输入应为topk的输出。该变量显示了每个标签的概率。
@@ -10919,7 +11103,7 @@ auc
.. code-block:: python
- # network is a binary classification model and label the ground truth
+ # network为二分类模型, label为ground truth(正确标记)
prediction = network(image, is_infer=True)
auc_out=fluid.layers.auc(input=prediction, label=label)
diff --git a/doc/fluid/api_cn/metrics_cn.rst b/doc/fluid/api_cn/metrics_cn.rst
index ab7c8b6e83983f4abe9ef6e192431600a9743d20..64cdf50d68befc74509729785ec34aeb836b5ec9 100644
--- a/doc/fluid/api_cn/metrics_cn.rst
+++ b/doc/fluid/api_cn/metrics_cn.rst
@@ -208,34 +208,51 @@ https://arxiv.org/abs/1512.02325
1. 根据detectors中的输入和label,计算 true positive 和 false positive
2. 计算map,支持 ‘11 point’ and ‘integral’
-
+
+参数:
+ - **input** (Variable) – detection的结果,一个 shape=[M, 6] 的 lodtensor。布局为[label, confidence, xmin, ymin, xmax, ymax]
+ - **gt_label** (Variable) – ground truth label 的索引,它是一个形状为[N, 1]的lodtensor
+ - **gt_box** (Variable) – ground truth bounds box (bbox),是一个具有形状的lod张量[N, 4]。布局是[xmin, ymin, xmax, ymax]
+ - **gt_difficult** (Variable|None) – 指定这个ground truth是否是一个difficult bounding bbox,它可以是一个 shape=[N, 1]的LoDTensor,也可以不被指定。如果设置为None,则表示所有的ground truth标签都不是difficult bbox。
+ - **class_num** (int) – 检测类别的数目
+ - **background_label** (int) – 背景标签的索引,背景标签将被忽略。如果设置为-1,则所有类别将被考虑,默认为0。
+ - **overlap_threshold** (float) – 判断真假阳性的阈值,默认为0.5
+ - **evaluate_difficult** (bool) – 是否考虑 difficult ground truth 进行评价,默认为 True。当 gt_difficult 为 None 时,这个参数不起作用。
+ - **ap_version** (string) – 平均精度的计算方法,必须是 "integral" 或 "11point"。详情请查看 https://sanchom.wordpress.com/tag/averageprecision/。 其中,11point为:11-point 插值平均精度。积分: precision-recall曲线的自然积分。
**代码示例**
.. code-block:: python
- pred = fluid.layers.fc(input=data, size=1000, act="tanh")
- batch_map = layers.detection_map(
- input,
- label,
- class_num,
- background_label,
- overlap_threshold=overlap_threshold,
- evaluate_difficult=evaluate_difficult,
- ap_version=ap_version)
-
- metric = fluid.metrics.DetectionMAP()
- for data in train_reader():
- loss, preds, labels = exe.run(fetch_list=[cost, batch_map])
- batch_size = data[0]
- metric.update(value=batch_map, weight=batch_size)
- numpy_map = metric.eval()
+ exe = fluid.Executor(place)
+ map_evaluator = fluid.Evaluator.DetectionMAP(input,
+ gt_label, gt_box, gt_difficult)
+ cur_map, accum_map = map_evaluator.get_map_var()
+ fetch = [cost, cur_map, accum_map]
+ for epoch in PASS_NUM:
+ map_evaluator.reset(exe)
+ for data in batches:
+ loss, cur_map_v, accum_map_v = exe.run(fetch_list=fetch)
+
+在上述例子中:
+
+ "cur_map_v" 是当前 mini-batch 的 mAP
+
+ "accum_map_v" 是一个 pass 的 mAP累加和
+.. py:method:: get_map_var()
+返回:当前 mini-batch 的 mAP 变量,和跨 mini-batch 的 mAP 累加和
+.. py:methord:: reset(executor, reset_program=None)
+在指定 batch 的每一 pass/user 开始时重置度量状态。
+
+参数:
+ - **executor** (Executor) – 执行reset_program的执行程序
+ - **reset_program** (Program|None) – 单一 program 的 reset 过程。如果设置为 None,将创建一个 program
diff --git a/doc/fluid/api_cn/net_cn.rst b/doc/fluid/api_cn/net_cn.rst
deleted file mode 100644
index 847804737164dde545d2eb11d5e746d90c2975bd..0000000000000000000000000000000000000000
--- a/doc/fluid/api_cn/net_cn.rst
+++ /dev/null
@@ -1,244 +0,0 @@
-
-#################
- fluid.nets
-#################
-
-
-
-.. _cn_api_fluid_nets_glu:
-
-glu
->>>>
-.. py:function:: paddle.fluid.nets.glu(input, dim=-1)
-T
-he Gated Linear Units(GLU)由切分(split),sigmoid激活函数和按元素相乘组成。沿着给定维将input拆分成两个大小相同的部分,a和b,计算如下:
-
-.. math::
-
- GLU(a,b) = a\bigotimes \sigma (b)
-
-参考论文: `Language Modeling with Gated Convolutional Networks `_
-
-参数:
- - **input** (Variable) - 输入变量,张量或者LoDTensor
- - **dim** (int) - 拆分的维度。如果 :math:`dim<0`,拆分的维为 :math:`rank(input)+dim`。默认为-1
-
-返回:变量 —— 变量的大小为输入的一半
-
-返回类型:变量(Variable)
-
-**代码示例:**
-
-.. code-block:: python
-
- data = fluid.layers.data(name="words", shape=[3, 6, 9], dtype="float32")
- output = fluid.nets.glu(input=data, dim=1) # shape of output: [3, 3, 9]
-
-
-
-
-
-英文版API文档: :ref:`api_fluid_nets_glu`
-
-.. _cn_api_fluid_nets_img_conv_group:
-
-img_conv_group
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-.. py:function:: paddle.fluid.nets.img_conv_group(input, conv_num_filter, pool_size, conv_padding=1, conv_filter_size=3, conv_act=None, param_attr=None, conv_with_batchnorm=False, conv_batchnorm_drop_rate=0.0, pool_stride=1, pool_type='max', use_cudnn=True)
-
-Image Convolution Group由Convolution2d,BatchNorm,DropOut和Pool2d组成。根据输入参数,img_conv_group将使用Convolution2d,BatchNorm,DropOut对Input进行连续计算,并将最后一个结果传递给Pool2d。
-
-参数:
- - **input** (Variable) - 具有[N,C,H,W]格式的输入图像。
- - **conv_num_filter** (list | tuple) - 表示该组的过滤器数。
- - **pool_size** (int | list | tuple) - ``Pool2d Layer`` 池的大小。如果pool_size是列表或元组,则它必须包含两个整数(pool_size_H,pool_size_W)。否则,pool_size_H = pool_size_W = pool_size。
- - **conv_padding** (int | list | tuple) - Conv2d Layer的 ``padding`` 大小。如果 ``padding`` 是列表或元组,则其长度必须等于 ``conv_num_filter`` 的长度。否则,所有Conv2d图层的 ``conv_padding`` 都是相同的。默认1。
- - **conv_filter_size** (int | list | tuple) - 过滤器大小。如果filter_size是列表或元组,则其长度必须等于 ``conv_num_filter`` 的长度。否则,所有Conv2d图层的 ``conv_filter_size`` 都是相同的。默认3。
- - **conv_act** (str) - ``Conv2d Layer`` 的激活类型, ``BatchNorm`` 后面没有。默认值:无。
- - **param_attr** (ParamAttr) - Conv2d层的参数。默认值:无
- - **conv_with_batchnorm** (bool | list) - 表示在 ``Conv2d Layer`` 之后是否使用 ``BatchNorm`` 。如果 ``conv_with_batchnorm`` 是一个列表,则其长度必须等于 ``conv_num_filter`` 的长度。否则, ``conv_with_batchnorm`` 指示是否所有Conv2d层都遵循 ``BatchNorm``。默认为False。
- - **conv_batchnorm_drop_rate** (float | list) - 表示 ``BatchNorm`` 之后的 ``Dropout Layer`` 的 ``rop_rate`` 。如果 ``conv_batchnorm_drop_rate`` 是一个列表,则其长度必须等于 ``conv_num_filter`` 的长度。否则,所有 ``Dropout Layers`` 的 ``drop_rate`` 都是 ``conv_batchnorm_drop_rate`` 。默认值为0.0。
- - **pool_stride** (int | list | tuple) - ``Pool2d`` 层的汇集步幅。如果 ``pool_stride`` 是列表或元组,则它必须包含两个整数(pooling_stride_H,pooling_stride_W)。否则,pooling_stride_H = pooling_stride_W = pool_stride。默认1。
- - **pool_type** (str) - 池化类型可以是最大池化的 ``max`` 和平均池化的 ``avg`` 。默认max。
- - **use_cudnn** (bool) - 是否使用cudnn内核,仅在安装cudnn库时才有效。默认值:True
-
-返回: 使用Convolution2d进行串行计算后的最终结果,BatchNorm,DropOut和Pool2d。
-
-返回类型: 变量(Variable)。
-
-**代码示例**
-
-.. code-block:: python
-
- img = fluid.layers.data(name='img', shape=[1, 28, 28], dtype='float32')
- conv_pool = fluid.nets.img_conv_group(input=img,
- num_channels=3,
- conv_padding=1,
- conv_num_filter=[3, 3],
- conv_filter_size=3,
- conv_act="relu",
- pool_size=2,
- pool_stride=2)
-
-
-
-英文版API文档: :ref:`api_fluid_nets_img_conv_group`
-
-.. _cn_api_fluid_nets_scaled_dot_product_attention:
-
-scaled_dot_product_attention
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-.. py:function:: paddle.fluid.nets.scaled_dot_product_attention(queries, keys, values, num_heads=1, dropout_rate=0.0)
-
-点乘attention运算。
-
-attention运算机制可以被视为将查询和一组键值对映射到输出。 将输出计算为值的加权和,其中分配给每个值的权重由查询的兼容性函数(此处的点积)与对应的密钥计算。
-
-可以通过(batch)矩阵乘法实现点积attention运算,如下所示:
-
-.. math::
- Attention(Q, K, V)= softmax(QK^\mathrm{T})V
-
-请参阅 `Attention Is All You Need `_
-
-参数:
- - **queries** (Variable) - 输入变量,应为3-D Tensor。
- - **keys** (Variable) - 输入变量,应为3-D Tensor。
- - **values** (Variable) - 输入变量,应为3-D Tensor。
- - **num_heads** (int) - 计算缩放点积attention运算的head数。默认值:1。
- - **dropout_rate** (float) - 降低attention的dropout率。默认值:0.0。
-
-返回: 通过multi-head来缩放点积attention运算的三维张量。
-
-返回类型: 变量(Variable)。
-
-抛出异常:
- - ``ValueError`` - 如果输入查询键,值不是3-D Tensor会报错。
-
-.. note::
- 当num_heads> 1时,分别学习三个线性投影,以将输入查询,键和值映射到查询',键'和值'。 查询',键'和值'与查询,键和值具有相同的形状。
- 当num_heads == 1时,scaled_dot_product_attention没有可学习的参数。
-
-**代码示例**
-
-.. code-block:: python
-
- queries = fluid.layers.data(name="queries",
- shape=[3, 5, 9],
- dtype="float32",
- append_batch_size=False)
- queries.stop_gradient = False
- keys = fluid.layers.data(name="keys",
- shape=[3, 6, 9],
- dtype="float32",
- append_batch_size=False)
- keys.stop_gradient = False
- values = fluid.layers.data(name="values",
- shape=[3, 6, 10],
- dtype="float32",
- append_batch_size=False)
- values.stop_gradient = False
- contexts = fluid.nets.scaled_dot_product_attention(queries, keys, values)
- contexts.shape # [3, 5, 10]
-
-
-
-
-
-英文版API文档: :ref:`api_fluid_nets_scaled_dot_product_attention`
-
-.. _cn_api_fluid_nets_sequence_conv_pool:
-
-sequence_conv_pool
->>>>>>>>>>>>>>>>>>>
-
-.. py:function:: paddle.fluid.nets.sequence_conv_pool(input, num_filters, filter_size, param_attr=None, act='sigmoid', pool_type='max')
-
-sequence_conv_pool由序列卷积和池化组成
-
-参数:
- - **input** (Variable) - sequence_conv的输入,支持变量时间长度输入序列。当前输入为shape为(T,N)的矩阵,T是mini-batch中的总时间步数,N是input_hidden_size
- - **num_filters** (int)- 滤波器数
- - **filter_size** (int)- 滤波器大小
- - **param_attr** (ParamAttr) - Sequence_conv层的参数。默认:None
- - **act** (str) - Sequence_conv层的激活函数类型。默认:sigmoid
- - **pool_type** (str)- 池化类型。可以是max-pooling的max,average-pooling的average,sum-pooling的sum,sqrt-pooling的sqrt。默认max
-
-返回:序列卷积(Sequence Convolution)和池化(Pooling)的结果
-
-
-返回类型:变量(Variable)
-
-**代码示例**:
-
-.. code-block:: python
-
- input_dim = len(word_dict)
- emb_dim = 128
- hid_dim = 512
- data = fluid.layers.data( ame="words", shape=[1], dtype="int64", lod_level=1)
- emb = fluid.layers.embedding(input=data, size=[input_dim, emb_dim], is_sparse=True)
- seq_conv = fluid.nets.sequence_conv_pool(input=emb,
- num_filters=hid_dim,
- filter_size=3,
- act="tanh",
- pool_type="sqrt")
-
-
-
-
-英文版API文档: :ref:`api_fluid_nets_sequence_conv_pool`
-
-.. _cn_api_fluid_nets_simple_img_conv_pool:
-
-simple_img_conv_pool
->>>>>>>>>>>>>>>>>>>>>>>>>
-
-.. py:function:: paddle.fluid.nets.simple_img_conv_pool(input, num_filters, filter_size, pool_size, pool_stride, pool_padding=0, pool_type='max', global_pooling=False, conv_stride=1, conv_padding=0, conv_dilation=1, conv_groups=1, param_attr=None, bias_attr=None, act=None, use_cudnn=True)
-
- ``simple_img_conv_pool`` 由一个Convolution2d和一个Pool2d组成。
-
-参数:
- - **input** (Variable) - 输入图像的格式为[N,C,H,W]。
- - **num_filters** (int) - ``filter`` 的数量。它与输出的通道相同。
- - **filter_size** (int | list | tuple) - 过滤器大小。如果 ``filter_size`` 是列表或元组,则它必须包含两个整数(filter_size_H,filter_size_W)。否则,filter_size_H = filter_size_W = filter_size。
- - **pool_size** (int | list | tuple) - Pool2d池化层大小。如果pool_size是列表或元组,则它必须包含两个整数(pool_size_H,pool_size_W)。否则,pool_size_H = pool_size_W = pool_size。
- - **pool_stride** (int | list | tuple) - Pool2d池化层步长。如果pool_stride是列表或元组,则它必须包含两个整数(pooling_stride_H,pooling_stride_W)。否则,pooling_stride_H = pooling_stride_W = pool_stride。
- - **pool_padding** (int | list | tuple) - Pool2d池化层的padding。如果pool_padding是列表或元组,则它必须包含两个整数(pool_padding_H,pool_padding_W)。否则,pool_padding_H = pool_padding_W = pool_padding。默认值为0。
- - **pool_type** (str) - 池化类型可以是 ``max-pooling`` 的 ``max`` 和平均池的 ``avg`` 。默认 ``max`` 。
- - **global_pooling** (bool)- 是否使用全局池。如果global_pooling = true,则忽略pool_size和pool_padding。默认为False
- - **conv_stride** (int | list | tuple) - conv2d Layer的步长。如果stride是列表或元组,则它必须包含两个整数,(conv_stride_H,conv_stride_W)。否则,conv_stride_H = conv_stride_W = conv_stride。默认值:conv_stride = 1。
- - **conv_padding** (int | list | tuple) - conv2d Layer的padding大小。如果padding是列表或元组,则它必须包含两个整数(conv_padding_H,conv_padding_W)。否则,conv_padding_H = conv_padding_W = conv_padding。默认值:conv_padding = 0。
- - **conv_dilation** (int | list | tuple) - conv2d Layer的dilation大小。如果dilation是列表或元组,则它必须包含两个整数(conv_dilation_H,conv_dilation_W)。否则,conv_dilation_H = conv_dilation_W = conv_dilation。默认值:conv_dilation = 1。
- - **conv_groups** (int) - conv2d Layer的组数。根据Alex Krizhevsky的Deep CNN论文中的分组卷积:当group = 2时,前半部分滤波器仅连接到输入通道的前半部分,而后半部分滤波器仅连接到后半部分输入通道。默认值:groups = 1。
- - **param_attr** (ParamAttr | None) - 可学习参数的参数属性或conv2d权重。如果将其设置为None或ParamAttr的一个属性,则conv2d将创建ParamAttr作为param_attr。如果未设置param_attr的初始化,则使用 :math:`Normal(0.0,std)` 初始化参数,并且 ``std`` 为 :math:`(\frac{2.0 }{filter\_elem\_num})^{0.5}` 。默认值:None
- - **bias_attr** (ParamAttr | bool | None) - conv2d的bias参数属性。如果设置为False,则不会向输出单元添加bias。如果将其设置为None或ParamAttr的一个属性,则conv2d将创建ParamAttr作为bias_attr。如果未设置bias_attr的初始化程序,则将偏差初始化为零。默认值:None
- - **act** (str) - conv2d的激活类型,如果设置为None,则不附加激活。默认值:无。
- - **use_cudnn** (bool) - 是否使用cudnn内核,仅在安装cudnn库时才有效。默认值:True。
-
-返回: Convolution2d和Pool2d之后输入的结果。
-
-返回类型: 变量(Variable)
-
-**示例代码**
-
-.. code-block:: python
-
- img = fluid.layers.data(name='img', shape=[1, 28, 28], dtype='float32')
- conv_pool = fluid.nets.simple_img_conv_pool(input=img,
- filter_size=5,
- num_filters=20,
- pool_size=2,
- pool_stride=2,
- act="relu")
-
-
-
-
-
-
-
-英文版API文档: :ref:`api_fluid_nets_simple_img_conv_pool`
-
diff --git a/doc/fluid/api_cn/nets_cn.rst b/doc/fluid/api_cn/nets_cn.rst
index 338657ad04388bf09f73863b7c37f1ed8cccd85b..8f95a142ae90466c4e5fc2ee9f02767d9d9c6923 100644
--- a/doc/fluid/api_cn/nets_cn.rst
+++ b/doc/fluid/api_cn/nets_cn.rst
@@ -170,6 +170,7 @@ sequence_conv_pool由序列卷积和池化组成
- **param_attr** (ParamAttr) - Sequence_conv层的参数。默认:None
- **act** (str) - Sequence_conv层的激活函数类型。默认:sigmoid
- **pool_type** (str)- 池化类型。可以是max-pooling的max,average-pooling的average,sum-pooling的sum,sqrt-pooling的sqrt。默认max
+ - **bias_attr** (ParamAttr|bool|None) – sequence_conv偏置的参数属性。如果设置为False,则不会向输出单元添加偏置。如果将参数设置为ParamAttr的None或one属性,sequence_conv将创建ParamAttr作为bias_attr。如果未设置bias_attr的初始化器,则初始化偏差为零。默认值:None。
返回:序列卷积(Sequence Convolution)和池化(Pooling)的结果
diff --git a/doc/fluid/api_cn/optimizer_cn.rst b/doc/fluid/api_cn/optimizer_cn.rst
index a5ac3ac2302c6c805bddde1aabfa0b7f42956eb6..29b6ad5489a5d7fe8be643cb253d1966c3ecb71e 100644
--- a/doc/fluid/api_cn/optimizer_cn.rst
+++ b/doc/fluid/api_cn/optimizer_cn.rst
@@ -134,7 +134,7 @@ Adamax 更新规则:
optimizer.minimize(cost)
.. note::
- 目前 ``AdamaxOptimizer`` 不支持 sparse gradient
+ 目前 ``AdamaxOptimizer`` 不支持 sparse parameter optimization.
@@ -231,7 +231,7 @@ Decayed Adagrad Optimizer
optimizer.minimize(cost)
.. note::
- ``DecayedAdagradOptimizer`` 不支持 sparse gradient
+ ``DecayedAdagradOptimizer`` 不支持 sparse parameter optimization
@@ -302,7 +302,7 @@ TFRTL 原始论文: ( `https://www.eecs.tufts.edu/~dsculley/papers/ad-click-pred
_, params_grads = optimizer.minimize(cost)
.. note::
- 目前, FtrlOptimizer 不支持 sparse gradient
+ 目前, FtrlOptimizer 不支持 sparse parameter optimization
diff --git a/doc/fluid/beginners_guide/index.rst b/doc/fluid/beginners_guide/index.rst
index a2c7d74254a7f54eebb9f5bb998c4c6ae991dcce..5cade329fd16bfe2652cf59052e950822b64ed79 100644
--- a/doc/fluid/beginners_guide/index.rst
+++ b/doc/fluid/beginners_guide/index.rst
@@ -8,7 +8,7 @@ PaddlePaddle (PArallel Distributed Deep LEarning)是一个易用、高效、灵
当您第一次来到PaddlePaddle,请您首先阅读以下文档,了解安装方法:
- - `安装说明 <../beginners_guide/install/Start.html>`_:我们支持在Ubuntu/CentOS/Windows/MacOS环境上的安装
+ - `安装说明 <../beginners_guide/install/index_cn.html>`_:我们支持在Ubuntu/CentOS/Windows/MacOS环境上的安装
如果您初次接触深度学习,在学习PaddlePaddle之前建议您先阅读以下资料:
@@ -18,8 +18,6 @@ PaddlePaddle (PArallel Distributed Deep LEarning)是一个易用、高效、灵
- `Fluid编程指南 <../beginners_guide/programming_guide/programming_guide.html>`_:介绍 Fluid 的基本概念和使用方法
- - `Fluid编程指南 <../beginners_guide/programming_guide/programming_guide.html>`_:介绍 Fluid 的基本概念和使用方法
-
- `快速入门 <../beginners_guide/quick_start/index.html>`_:提供线性回归和识别数字两个入门级模型,帮助您快速上手训练网络
- `深度学习基础 <../beginners_guide/basics/index.html>`_:覆盖图像分类、个性化推荐、机器翻译等多个深度领域的基础知识,提供 Fluid 实现案例
diff --git a/doc/fluid/beginners_guide/install/FAQ.md b/doc/fluid/beginners_guide/install/FAQ.md
index 80a5dd92fbdf4b2f6188c705741ddd0a10b10d9c..97455a1f70d209814c6aa35abbf116aa3f5c8df0 100644
--- a/doc/fluid/beginners_guide/install/FAQ.md
+++ b/doc/fluid/beginners_guide/install/FAQ.md
@@ -1,5 +1,6 @@
***
-
+
+
# **FAQ**
- CentOS6下如何编译python2.7为共享库?
diff --git a/doc/fluid/beginners_guide/install/Tables.md b/doc/fluid/beginners_guide/install/Tables.md
index 7a422b536190e93bcb5fe5ad1d88c020e5ce3ff8..86ff0bd6ee36e75b62cb657fd2ff02439f819a9f 100644
--- a/doc/fluid/beginners_guide/install/Tables.md
+++ b/doc/fluid/beginners_guide/install/Tables.md
@@ -359,12 +359,110 @@ PaddePaddle通过编译时指定路径来实现引用各种BLAS/CUDA/cuDNN库。
您可以在 [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) 中找到PaddlePaddle的各个发行的版本的docker镜像。
+***
+
+
+## **多版本whl包列表-v1.2**
+
+
+
+
-***
-## **多版本whl包列表**
+## **多版本whl包列表-dev**
-
-
-
-
-
-
-
diff --git a/doc/fluid/beginners_guide/install/compile/compile_CentOS.md b/doc/fluid/beginners_guide/install/compile/compile_CentOS.md
index e9eed3e8e9d074c6af57f9e0f45993a03ed32da9..b7da31bbe54f0628500456c7c129b7edf9a2eaeb 100644
--- a/doc/fluid/beginners_guide/install/compile/compile_CentOS.md
+++ b/doc/fluid/beginners_guide/install/compile/compile_CentOS.md
@@ -16,7 +16,7 @@
## 选择如何编译
我们在CentOS的系统下提供2种编译方式:
-* Docker源码编译(不支持CentOS 6 / 7的GPU版本)
+* Docker源码编译(不支持CentOS 6 / 7的GPU版本)(该镜像已经包含python2.7、python3.6、python3.7环境)
* 直接本机源码编译(不支持CentOS 6的全部版本以及CentOS 7的GPU版本)
我们更加推荐**使用Docker进行编译**,因为我们在把工具和配置都安装在一个 Docker image 里。这样如果遇到问题,其他人可以复现问题以便帮助。另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。
@@ -60,10 +60,10 @@
`mkdir -p /paddle/build && cd /paddle/build`
-7. 使用以下命令安装相关依赖:
+7. 使用以下命令安装相关依赖:(For Python3:请选择您希望用的python版本对应的pip,如pip3.5、pip3.6)
For Python2: pip install protobuf==3.1.0
- For Python3: pip3 install protobuf==3.1.0
+ For Python3: pip3.5 install protobuf==3.1.0
> 安装protobuf 3.1.0。
@@ -80,7 +80,7 @@
`cmake .. -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release`
- >> 我们目前不支持CentOS下GPU版本PaddlePaddle的编译
+ > 我们目前不支持CentOS下GPU版本PaddlePaddle的编译
9. 执行编译:
@@ -90,10 +90,10 @@
10. 编译成功后进入`/paddle/build/python/dist`目录下找到生成的`.whl`包: `cd /paddle/build/python/dist`
-11. 在当前机器或目标机器安装编译好的`.whl`包:
+11. 在当前机器或目标机器安装编译好的`.whl`包:(For Python3:请选择您希望用的python版本对应的pip,如pip3.5、pip3.6)
For Python2: pip install (whl包的名字)
- For Python3: pip3 install (whl包的名字)
+ For Python3: pip3.5 install (whl包的名字)
至此您已经成功使用Docker安装PaddlePaddle,您只需要进入Docker容器后运行PaddlePaddle即可,更多Docker使用请参见[Docker官方文档](https://docs.docker.com)。
@@ -118,7 +118,7 @@
1. 检查您的计算机和操作系统是否符合我们支持的编译标准: `uname -m && cat /etc/*release`
-2. 更新`yum`的源: `yum update`, 并添加必要的yum源:`yum install -y epel-release`
+2. 更新`yum`的源: `yum update`, 并添加必要的yum源:`yum install -y epel-release`, 并提前安装openCV
3. 安装必要的工具`bzip2`以及`make`: `yum install -y bzip2` , `yum install -y make`
@@ -212,6 +212,6 @@
## ***如何卸载***
-请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令):
+请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令,请使用对应版本pip):
* ***CPU版本的PaddlePaddle***: `pip uninstall paddlepaddle` 或 `pip3 uninstall paddlepaddle`
diff --git a/doc/fluid/beginners_guide/install/compile/compile_MacOS.md b/doc/fluid/beginners_guide/install/compile/compile_MacOS.md
index 28ee06180b65ce50834be6513f81881dee3f3c58..4d3d422d465f6e9f7de942864bac26107ce87ebb 100644
--- a/doc/fluid/beginners_guide/install/compile/compile_MacOS.md
+++ b/doc/fluid/beginners_guide/install/compile/compile_MacOS.md
@@ -17,13 +17,12 @@
在MacOS 10.12/10.13/10.14 的系统下我们提供2种编译方式:
-* Docker源码编译
+* Docker源码编译 (该镜像已经包含python2.7、python3.6、python3.7环境)
* 直接本机源码编译
-
我们更加推荐**使用Docker进行编译**,因为我们在把工具和配置都安装在一个 Docker image 里。这样如果遇到问题,其他人可以复现问题以便帮助。另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。
同样对于那些出于各种原因不能够安装Docker的用户我们也提供了可以从**本机直接源码编译**的方法,但是由于在本机上的情况更加复杂,因此我们只支持特定的系统。
@@ -31,8 +30,6 @@
-
-
@@ -71,10 +68,10 @@
`mkdir -p /paddle/build && cd /paddle/build`
-8. 使用以下命令安装相关依赖:
+8. 使用以下命令安装相关依赖:(For Python3:请选择您希望用的python版本对应的pip,如pip3.5、pip3.6)
For Python2: pip install protobuf==3.1.0
- For Python3: pip3 install protobuf==3.1.0
+ For Python3: pip3.5 install protobuf==3.1.0
> 安装protobuf 3.1.0。
@@ -105,10 +102,10 @@
11. 编译成功后进入`/paddle/build/python/dist`目录下找到生成的`.whl`包: `cd /paddle/build/python/dist`
-12. 在当前机器或目标机器安装编译好的`.whl`包:
+12. 在当前机器或目标机器安装编译好的`.whl`包:(For Python3:请选择您希望用的python版本对应的pip,如pip3.5、pip3.6)
For Python2: pip install (whl包的名字)
- For Python3: pip3 install (whl包的名字)
+ For Python3: pip3.5 install (whl包的名字)
至此您已经成功使用Docker安装PaddlePaddle,您只需要进入Docker容器后运行PaddlePaddle即可,更多Docker使用请参见[Docker官方文档](https://docs.docker.com)。
@@ -124,7 +121,7 @@
**请严格按照以下指令顺序执行**
-1. 检查您的计算机和操作系统是否符合我们支持的编译标准: `uname -m` 并且在`关于本机`中查看系统版本。
+1. 检查您的计算机和操作系统是否符合我们支持的编译标准: `uname -m` 并且在`关于本机`中查看系统版本。并提前安装openCV。
2. 安装python以及pip:
@@ -223,6 +220,6 @@
## ***如何卸载***
-请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令):
+请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令,请使用相应版本的pip):
* ***CPU版本的PaddlePaddle***: `pip uninstall paddlepaddle` 或 `pip3 uninstall paddlepaddle`
diff --git a/doc/fluid/beginners_guide/install/compile/compile_Ubuntu.md b/doc/fluid/beginners_guide/install/compile/compile_Ubuntu.md
index c72d60341aa628c972c1b55d3776449d39390daa..8cc80b40c1843b849163df6b6176cff537622db7 100644
--- a/doc/fluid/beginners_guide/install/compile/compile_Ubuntu.md
+++ b/doc/fluid/beginners_guide/install/compile/compile_Ubuntu.md
@@ -18,7 +18,7 @@
## 选择如何编译
在Ubuntu的系统下我们提供2种编译方式:
-* Docker源码编译
+* Docker源码编译 (该镜像已经包含python2.7、python3.6、python3.7环境)
* 直接本机源码编译(不支持ubuntu18.04下GPU版本)
我们更加推荐**使用Docker进行编译**,因为我们在把工具和配置都安装在一个 Docker image 里。这样如果遇到问题,其他人可以复现问题以便帮助。另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。有人用虚拟机来类比 Docker。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。
@@ -62,10 +62,10 @@
`mkdir -p /paddle/build && cd /paddle/build`
-7. 使用以下命令安装相关依赖:
+7. 使用以下命令安装相关依赖:(For Python3:请选择您希望用的python版本对应的pip,如pip3.5、pip3.6)
For Python2: pip install protobuf==3.1.0
- For Python3: pip3 install protobuf==3.1.0
+ For Python3: pip3.5 install protobuf==3.1.0
> 安装protobuf 3.1.0。
@@ -95,10 +95,10 @@
10. 编译成功后进入`/paddle/build/python/dist`目录下找到生成的`.whl`包: `cd /paddle/build/python/dist`
-11. 在当前机器或目标机器安装编译好的`.whl`包:
+11. 在当前机器或目标机器安装编译好的`.whl`包:(For Python3:请选择您希望用的python版本对应的pip,如pip3.5、pip3.6)
For Python2: pip install (whl包的名字)
- For Python3: pip3 install (whl包的名字)
+ For Python3: pip3.5 install (whl包的名字)
至此您已经成功使用Docker安装PaddlePaddle,您只需要进入Docker容器后运行PaddlePaddle即可,更多Docker使用请参见[Docker官方文档](https://docs.docker.com)。
@@ -116,7 +116,7 @@
1. 检查您的计算机和操作系统是否符合我们支持的编译标准: `uname -m && cat /etc/*release`
-2. 更新`apt`的源: `apt update`
+2. 更新`apt`的源: `apt update`, 并提前安装openCV
3. 我们支持使用virtualenv进行编译安装,首先请使用以下命令创建一个名为`paddle-venv`的虚环境:
@@ -205,7 +205,7 @@
## ***如何卸载***
-请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令):
+请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令,请使用对应版本的pip):
* ***CPU版本的PaddlePaddle***: `pip uninstall paddlepaddle` 或 `pip3 uninstall paddlepaddle`
diff --git a/doc/fluid/beginners_guide/install/compile/fromsource.rst b/doc/fluid/beginners_guide/install/compile/fromsource.rst
index a591c3f106a5ab7ccbcb323d18693d0a0bbb5676..72f5256ce2d4cce6d847e1689e1ceac101b8ad17 100644
--- a/doc/fluid/beginners_guide/install/compile/fromsource.rst
+++ b/doc/fluid/beginners_guide/install/compile/fromsource.rst
@@ -1,5 +1,5 @@
===========================
-**从源码编译PaddlePaddle**
+**从源码编译**
===========================
您也可以选择源码编译的方式编译安装PaddlePaddle,但由于本机环境的多样性,在编译源码时易出现复杂问题,可能会造成您安装失败。为保证您顺利安装,推荐您优先选择普通安装方式。
diff --git a/doc/fluid/beginners_guide/install/index_cn.rst b/doc/fluid/beginners_guide/install/index_cn.rst
index 6a0b896a195e95dcc28aebcc39e9568c84bc72de..5b7e02ba766cd95a1ce443c7a9e41d53dd816628 100644
--- a/doc/fluid/beginners_guide/install/index_cn.rst
+++ b/doc/fluid/beginners_guide/install/index_cn.rst
@@ -8,7 +8,8 @@
* *MacOS 10.11 / 10.12 / 10.13 / 10.14*
* *Windows7 / 8/ 10(专业版/企业版)*
-请确保您的环境满足以上条件
+
+请确保您的环境满足以上条件,我们默认提供的安装同时需要您的计算机拥有64位操作系统,处理器支持AVX指令集,否则请选择 `多版本whl包安装列表 `_ 中 :code:`no_avx` 的版本
- 如果您希望使用 `pip `_ 进行安装PaddlePaddle可以直接使用以下命令:
diff --git a/doc/fluid/beginners_guide/install/install_CentOS.md b/doc/fluid/beginners_guide/install/install_CentOS.md
index 4eecd3a0b75f4df3d5d11656f114e8dfe83a9769..de020cd4b9b8f7718581b4ef0448a4f3d6acef9e 100644
--- a/doc/fluid/beginners_guide/install/install_CentOS.md
+++ b/doc/fluid/beginners_guide/install/install_CentOS.md
@@ -2,10 +2,13 @@
# **CentOS下安装**
-本说明将介绍如何在*64位台式机或笔记本电脑*以及CentOS系统下安装PaddlePaddle,我们支持的CentOS系统需满足以下要求:
+本说明将介绍如何在*64位台式机或笔记本电脑*以及CentOS系统下安装PaddlePaddle,我们支持的CentOS系统需满足以下要求:
-请注意:在其他系统上的尝试可能会导致安装失败。
+
+请注意:在其他系统上的尝试可能会导致安装失败。请确保您的环境满足以上条件,我们默认提供的安装同时需要您的计算机处理器支持AVX指令集,否则请选择[多版本whl包安装列表](Tables.html/#ciwhls)中`no_avx`的版本。
+
+CentOS系统下您可以使用`cat /proc/cpuinfo | grep avx`来检测您的处理器是否支持AVX指令集
* *CentOS 6 / 7*
@@ -24,9 +27,9 @@
在CentOS的系统下我们提供4种安装方式:
* pip安装
-* Docker安装(不支持GPU版本)
+* Docker安装(不支持GPU版本)(镜像中python的版本为2.7)
* 源码编译安装(不支持CentOS 6的所有版本以及CentOS 7的GPU版本)
-* Docker源码编译安装(不支持GPU版本)
+* Docker源码编译安装(不支持GPU版本)(镜像中的python版本为2.7,3.5,3.6,3.7)
@@ -34,7 +37,7 @@
**使用pip安装**(最便捷的安装方式),我们为您提供pip安装方法,但它更依赖您的本机环境,可能会出现和您本机环境相关的一些问题。
-**使用Docker进行安装**(最保险的安装方式),因为我们在把工具和配置都安装在一个 Docker image 里,这样如果遇到问题,其他人可以复现问题以便帮助。另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。
+**使用Docker进行安装**(最保险的安装方式),因为我们在把工具和配置都安装在一个 Docker image 里,这样如果遇到问题,其他人可以复现问题以便帮助。另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。
从[**源码编译安装**](#ct_source)以及[**使用Docker进行源码编译安装**](#ct_docker),这是一种通过将PaddlePaddle源代码编译成为二进制文件,然后在安装这个二进制文件的过程,相比使用我们为您编译过的已经通过测试的二进制文件形式的PaddlePaddle,手动编译更为复杂,我们将在说明的最后详细为您解答。
@@ -48,14 +51,14 @@
您可以直接粘贴以下命令到命令行来安装PaddlePaddle(适用于CentOS7安装CPU-ONLY的版本),如果出现问题,您可以参照后面的解释对命令作出适应您系统的更改:
Python2.7:
-
- yum update && yum install -y epel-release && yum install -y python-devel python-pip && pip install paddlepaddle
-
-
+
+ yum update && yum install -y epel-release && yum install -y python-devel python-pip && pip install paddlepaddle
+
+
Python3.5、3.6、3.7: (由于在CentOS下安装Python3的方法较为复杂,我们提供默认您已经正确安装python3.5+以及pip3之后的安装命令)
-
- yum update && yum install -y epel-release && pip3 install paddlepaddle
-
+
+ yum update && yum install -y epel-release && pip3 install paddlepaddle
+
首先,我们使用以下指令来**检测本机的环境**是否适合安装PaddlePaddle:
@@ -66,44 +69,44 @@ Python3.5、3.6、3.7: (由于在CentOS下安装Python3的方法较为复杂,
其次,您的计算机需要满足以下要求:
-* Python2.7.x (devel),Pip >= 9.0.1
+* Python2.7.x (devel),Pip >= 9.0.1
- > CentOS6需要编译Python2.7成[共享库](./FAQ.html/#FAQ)。
+ > CentOS6需要编译Python2.7成[共享库](./FAQ.html/#FAQ)。
-* Python3.5+.x (devel),Pip3 >= 9.0.1
+* Python3.5+.x (devel),Pip3 >= 9.0.1
> 您的CentOS上可能已经安装pip请使用pip -V来确认我们建议使用pip 9.0.1或更高版本来安装。
更新yum的源: `yum update` 并安装拓展源以安装pip: `yum install -y epel-release`
- 使用以下命令安装或升级Python和pip到需要的版本:
-
- - For Python2: `sudo yum install python-devel python-pip`
+ 使用以下命令安装或升级Python和pip到需要的版本:
+
+ - For Python2: `sudo yum install python-devel python-pip`
- For Python3: (请参照Python官方流程安装,并注意pip3命令对应的python3版本是否一致,如果有多个python3版本,请指定pip版本如pip3.7,或者将pip3软链到您使用的python版本下)
-
+
> 即使您的环境中已经有`Python`也需要安装`python develop`套装。
下面将说明如何安装PaddlePaddle:
1. 使用pip install来安装PaddlePaddle:
-
+
* 对于需要**CPU版本PaddlePaddle**的用户:`pip install paddlepaddle` 或 `pip3 install paddlepaddle`
* 对于需要**GPU版本PaddlePaddle**的用户: `pip install paddlepaddle-gpu` 或 `pip3 install paddlepaddle-gpu`
-
+
> 1. 为防止出现nccl.h找不到的问题请首先按照NVIDIA[官方网站](https://developer.nvidia.com/nccl/nccl-download)的指示正确安装nccl2
- > 2. 如果您不规定pypi包版本号,我们默认为您提供支持Cuda 9/cuDNN v7的PaddlePaddle版本。
+ > 2. 如果您不规定pypi包版本号,我们默认为您提供支持Cuda 9/cuDNN v7的PaddlePaddle版本。
* 对于出现`Cannot uninstall 'six'.`问题的用户,可是由于您的系统中已有的Python安装问题造 成的,请使用`pip install paddlepaddle --ignore-installed six`(CPU)或`pip install paddlepaddle-gpu --ignore-installed six`(GPU)解决。
-
- * 对于有**其他要求**的用户:`pip install paddlepaddle==[版本号]` 或 `pip3 install paddlepaddle==[版本号]`
-
+
+ * 对于有**其他要求**的用户:`pip install paddlepaddle==[版本号]` 或 `pip3 install paddlepaddle==[版本号]`
+
> `版本号`参见[安装包列表](./Tables.html/#whls)或者您如果需要获取并安装**最新的PaddlePaddle开发分支**,可以从[多版本whl包列表](./Tables.html/#ciwhls)或者我们的[CI系统](https://paddleci.ngrok.io/project.html?projectId=Manylinux1&tab=projectOverview) 中下载最新的whl安装包和c-api开发包并安装。如需登录,请点击“Log in as guest”。
-
-
-
-
-
+
+
+
+
+
现在您已经完成通过`pip install` 来安装的PaddlePaddle的过程。
@@ -122,52 +125,50 @@ Python3.5、3.6、3.7: (由于在CentOS下安装Python3的方法较为复杂,
-
当您已经**正确安装Docker**后你就可以开始**使用Docker安装PaddlePaddle**
1. 使用以下指令拉取我们为您预安装好PaddlePaddle的镜像:
* 对于需要**CPU版本的PaddlePaddle**的用户请使用以下指令拉取我们为您预安装好*PaddlePaddle For CPU*的镜像:
- `docker pull hub.baidubce.com/paddlepaddle/paddle:1.1`
-
+ `docker pull hub.baidubce.com/paddlepaddle/paddle:1.2`
+
* 您也可以通过以下指令拉取任意的我们提供的Docker镜像:
`docker pull hub.baidubce.com/paddlepaddle/paddle:[tag]`
-
- > (请把[tag]替换为[镜像表](./Tables.html/#dockers)中的内容)
+
+ > (请把[tag]替换为[镜像表](./Tables.html/#dockers)中的内容)
2. 使用以下指令用已经拉取的镜像构建并进入Docker容器:
`docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash`
-
- > 上述命令中,--name [Name of container] 设定Docker的名称;-it 参数说明容器已和本机交互式运行; -v $PWD:/paddle 指定将当前路径(Linux中PWD变量会展开为当前路径的[绝对路径](https://baike.baidu.com/item/绝对路径/481185))挂载到容器内部的 /paddle 目录; `` 指定需要使用的image名称,如果您需要使用我们的镜像请使用`hub.baidubce.com/paddlepaddle/paddle:[tag]` 注:tag的意义同第二步,/bin/bash是在Docker中要执行的命令。
+
+ > 上述命令中,--name [Name of container] 设定Docker的名称;-it 参数说明容器已和本机交互式运行; -v $PWD:/paddle 指定将当前路径(Linux中PWD变量会展开为当前路径的[绝对路径](https://baike.baidu.com/item/绝对路径/481185))挂载到容器内部的 /paddle 目录; `` 指定需要使用的image名称,如果您需要使用我们的镜像请使用`hub.baidubce.com/paddlepaddle/paddle:[tag]` 注:tag的意义同第二步,/bin/bash是在Docker中要执行的命令。
3. (可选:当您需要第二次进入Docker容器中)使用如下命令使用PaddlePaddle:
`docker start [Name of container]`
-
+
> 启动之前创建的容器。
`docker attach [Name of container]`
-
+
> 进入启动的容器。
-
+
至此您已经成功使用Docker安装PaddlePaddle,您只需要进入Docker容器后运行PaddlePaddle即可,更多Docker使用请参见[Docker官方文档](https://docs.docker.com)。
> 注:PaddlePaddle Docker镜像为了减小体积,默认没有安装`vim`,您可以在容器中执行 `apt-get install -y vim` 安装后,在容器中编辑代码。
-
## ***验证安装***
安装完成后您可以使用:`python` 或 `python3` 进入Python解释器,然后使用`import paddle.fluid` 验证是否安装成功。
## ***如何卸载***
-请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令):
+请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令,请使用相应版本的pip):
* ***CPU版本的PaddlePaddle***: `pip uninstall paddlepaddle` 或 `pip3 uninstall paddlepaddle`
diff --git a/doc/fluid/beginners_guide/install/install_MacOS.md b/doc/fluid/beginners_guide/install/install_MacOS.md
index 45c5acaf602341d589eb62a1adcd2d1650519765..d0464e0b77e70e2056501b1f81a1b3fcf6d56702 100644
--- a/doc/fluid/beginners_guide/install/install_MacOS.md
+++ b/doc/fluid/beginners_guide/install/install_MacOS.md
@@ -18,14 +18,14 @@
在MacOS的系统下我们提供3种安装方式:
* pip安装(不支持GPU版本)(python3下不支持分布式)
-* Docker安装(不支持GPU版本)
-* Docker源码编译安装(不支持GPU版本)
+* Docker安装(不支持GPU版本)(镜像中python的版本为2.7)
+* Docker源码编译安装(不支持GPU版本)(镜像中的python版本为2.7,3.5,3.6,3.7)
**使用pip安装**(最便捷的安装方式),我们为您提供pip安装方法,但它更依赖您的本机环境,可能会出现和您本机环境相关的一些问题。
-**使用Docker进行安装**(最保险的安装方式),因为我们在把工具和配置都安装在一个 Docker image 里,这样如果遇到问题,其他人可以复现问题以便帮助。另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。
+**使用Docker进行安装**(最保险的安装方式),因为我们在把工具和配置都安装在一个 Docker image 里,这样如果遇到问题,其他人可以复现问题以便帮助。另外,对于习惯使用Windows和MacOS的开发者来说,使用Docker就不用配置交叉编译环境了。需要强调的是:Docker 不会虚拟任何硬件,Docker container 里运行的编译工具实际上都是在本机的 CPU 和操作系统上直接运行的,性能和把编译工具安装在本机运行一样。
@@ -36,35 +36,33 @@
首先,**检查您的计算机和操作系统**是否符合我们支持的编译标准: `uname -m` 并且在`关于本机`中查看系统版本。
-其次,您的计算机需要满足以下要求:
+其次,您的计算机需要满足以下要求:
> **请不要使用MacOS中自带python**,对于**Python2**,建议您使用[Homebrew](https://brew.sh)或[Python.org](https://www.python.org/ftp/python/2.7.15/python-2.7.15-macosx10.9.pkg)提供的python2.7.15;对于**Python3**,请使用[Python.org](https://www.python.org/downloads/mac-osx/)提供的python3.5.x、python3.6.x或python3.7.x。
-
+
For python2: brew install python@2 或 使用Python官方下载的python2.7.15
For python3: 使用Python官方下载的python3.5.x、python3.6.x或python3.7.x
-* Python2.7.x,Pip >= 9.0.1
-* Python3.5.x,Pip3 >= 9.0.1
-* Python3.6.x,Pip3 >= 9.0.1
-* Python3.7.x,Pip3 >= 9.0.1
+* Python2.7.x,Pip >= 9.0.1
+* Python3.5.x,Pip3 >= 9.0.1
+* Python3.6.x,Pip3 >= 9.0.1
+* Python3.7.x,Pip3 >= 9.0.1
+
+ > 注: 您的MacOS上可能已经安装pip请使用pip -V来确认我们建议使用pip 9.0.1或更高版本来安装。
- > 注: 您的MacOS上可能已经安装pip请使用pip -V来确认我们建议使用pip 9.0.1或更高版本来安装。
-
下面将说明如何安装PaddlePaddle:
1. 使用pip install来安装PaddlePaddle:
-
+
* 对于需要**CPU版本PaddlePaddle**的用户:`pip install paddlepaddle` 或 `pip3 install paddlepaddle`
-
+
* 对于有**其他要求**的用户:`pip install paddlepaddle==[版本号]` 或 `pip3 install paddlepaddle==[版本号]`
-
- > `版本号`参见[安装包列表](./Tables.html/#whls)或者您如果需要获取并安装**最新的PaddlePaddle开发分支**,可以从[多版本whl包列表](./Tables.html/#ciwhls)或者我们的[CI系统](https://paddleci.ngrok.io/project.html?projectId=Manylinux1&tab=projectOverview) 中下载最新的whl安装包和c-api开发包并安装。如需登录,请点击“Log in as guest”。
-
-
-
-
-
+
+ > `版本号`参见[安装包列表](./Tables.html/#whls)或者您如果需要获取并安装**最新的PaddlePaddle开发分支**,可以从[CI系统](https://paddleci.ngrok.io/project.html?projectId=Manylinux1&tab=projectOverview) 中下载最新的whl安装包和c-api开发包并安装。如需登录,请点击“Log in as guest”。
+
+
+
现在您已经完成通过`pip install` 来安装的PaddlePaddle的过程。
@@ -86,14 +84,14 @@
* 对于需要**CPU版本的PaddlePaddle**的用户请使用以下指令拉取我们为您预安装好*PaddlePaddle For CPU*的镜像:
- `docker pull hub.baidubce.com/paddlepaddle/paddle:1.1`
-
+ `docker pull hub.baidubce.com/paddlepaddle/paddle:1.2`
+
* 您也可以通过以下指令拉取任意的我们提供的Docker镜像:
`docker pull hub.baidubce.com/paddlepaddle/paddle:[tag]`
-
+
> (请把[tag]替换为[镜像表](./Tables.html/#dockers)中的内容)
-
+
2. 使用以下指令用已经拉取的镜像构建并进入Docker容器:
`docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash`
@@ -103,17 +101,18 @@
3. (可选:当您需要第二次进入Docker容器中)使用如下命令使用PaddlePaddle:
`docker start [Name of container]`
-
+
> 启动之前创建的容器。
`docker attach [Name of container]`
-
- > 进入启动的容器。
-
-
+
+ > 进入启动的容器。
+
+
至此您已经成功使用Docker安装PaddlePaddle,您只需要进入Docker容器后运行PaddlePaddle即可,更多Docker使用请参见[Docker官方文档](https://docs.docker.com)。
> 注:PaddlePaddle Docker镜像为了减小体积,默认没有安装`vim`,您可以在容器中执行 `apt-get install -y vim` 安装后,在容器中编辑代码。
+
@@ -124,7 +123,7 @@
## ***如何卸载***
-请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令):
+请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令,请使用相应版本的pip):
-* ***CPU版本的PaddlePaddle***: `pip uninstall paddlepaddle` 或 `pip3 uninstall paddlepaddle`
+* ***CPU版本的PaddlePaddle***: `pip uninstall paddlepaddle` 或 `pip3 uninstall paddlepaddle`
diff --git a/doc/fluid/beginners_guide/install/install_Ubuntu.md b/doc/fluid/beginners_guide/install/install_Ubuntu.md
index 80867aef3198ff19d2db8c76bff406cac35f7221..7dcd78870f305e31c089ccf1633164c17a72fd82 100644
--- a/doc/fluid/beginners_guide/install/install_Ubuntu.md
+++ b/doc/fluid/beginners_guide/install/install_Ubuntu.md
@@ -4,7 +4,11 @@
本说明将介绍如何在*64位台式机或笔记本电脑*以及Ubuntu系统下安装PaddlePaddle,我们支持的Ubuntu系统需满足以下要求:
-请注意:在其他系统上的尝试可能会导致安装失败。
+
+
+请注意:在其他系统上的尝试可能会导致安装失败。请确保您的环境满足以上条件,我们默认提供的安装同时需要您的计算机处理器支持AVX指令集,否则请选择[多版本whl包安装列表](Tables.html/#ciwhls)中`no_avx`的版本。
+
+Ubuntu系统下您可以使用`cat /proc/cpuinfo | grep avx`来检测您的处理器是否支持AVX指令集
* *Ubuntu 14.04 /16.04 /18.04*
@@ -24,9 +28,9 @@
在Ubuntu的系统下我们提供4种安装方式:
* pip安装
-* Docker安装
+* Docker安装(镜像中python的版本为2.7)
* 源码编译安装
-* Docker源码编译安装
+* Docker源码编译安装(镜像中的python版本为2.7,3.5,3.6,3.7)
@@ -51,12 +55,12 @@ Python2.7:
apt update && apt install -y python-dev python-pip && pip install paddlepaddle
-Python3.5(该指令适用于本机未安装python2的用户,否则,请卸载python2之后再使用本指令):
-
+Python3.5(该指令适用于本机未安装python2的用户,否则,请卸载python2之后再使用本指令):
+
apt-get udpate && apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa && apt-get install -y curl python3.5 python3.5-dev wget vim git && curl https://bootstrap.pypa.io/get-pip.py -o - | python3.5 && easy_install pip && pip3 install paddlepaddle
-
+
Python3.6、Python3.7:(由于版本相对较新,在不同Ubuntu版本上安装差异较大,不一一描述其安装过程,执行以下命令前,我们认为您已经准备好python3.6或3.7的环境,并安装了对应版本的python3-dev以及pip3)
-
+
apt update && pip3 install paddlepaddle
@@ -92,11 +96,11 @@ Python3.6、Python3.7:(由于版本相对较新,在不同Ubuntu版本上
* 对于需要**CPU版本PaddlePaddle**的用户:`pip install paddlepaddle` 或 `pip3 install paddlepaddle`
* 对于需要**GPU版本PaddlePaddle**的用户:`pip install paddlepaddle-gpu` 或 `pip3 install paddlepaddle-gpu`
-
- > 1. 为防止出现nccl.h找不到的问题请首先按照以下命令安装nccl2(这里提供的是ubuntu 16.04,CUDA9,cuDNN v7下nccl2的安装指令),更多版本的安装信息请参考NVIDIA[官方网站](https://developer.nvidia.com/nccl/nccl-download):
- i. `wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb`
- ii. `dpkg -i nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb`
- iii. `sudo apt-get install -y libnccl2=2.2.13-1+cuda9.0 libnccl-dev=2.2.13-1+cuda9.0`
+
+ > 1. 为防止出现nccl.h找不到的问题请首先按照以下命令安装nccl2(这里提供的是ubuntu 16.04,CUDA9,cuDNN v7下nccl2的安装指令),更多版本的安装信息请参考NVIDIA[官方网站](https://developer.nvidia.com/nccl/nccl-download):
+ i. `wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb`
+ ii. `dpkg -i nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb`
+ iii. `sudo apt-get install -y libnccl2=2.2.13-1+cuda9.0 libnccl-dev=2.2.13-1+cuda9.0`
> 2. 如果您不规定pypi包版本号,我们默认为您提供支持Cuda 9/cuDNN v7的PaddlePaddle版本。
@@ -104,7 +108,7 @@ Python3.6、Python3.7:(由于版本相对较新,在不同Ubuntu版本上
* 对于有**其他要求**的用户:`pip install paddlepaddle==[版本号]` 或 `pip3 install paddlepaddle==[版本号]`
- > `版本号`参见[安装包列表](./Tables.html/#whls)或者您如果需要获取并安装**最新的PaddlePaddle开发分支**,可以从我们的[CI系统](https://paddleci.ngrok.io/project.html?projectId=Manylinux1&tab=projectOverview) 中下载最新的whl安装包和c-api开发包并安装。如需登录,请点击“Log in as guest”。
+ > `版本号`参见[安装包列表](./Tables.html/#whls)或者您如果需要获取并安装**最新的PaddlePaddle开发分支**,可以从[多版本whl包列表](./Tables.html/#ciwhls)或者我们的[CI系统](https://paddleci.ngrok.io/project.html?projectId=Manylinux1&tab=projectOverview) 中下载最新的whl安装包和c-api开发包并安装。如需登录,请点击“Log in as guest”。
@@ -132,11 +136,11 @@ Python3.6、Python3.7:(由于版本相对较新,在不同Ubuntu版本上
* 对于需要**CPU版本的PaddlePaddle**的用户请使用以下指令拉取我们为您预安装好*PaddlePaddle For CPU*的镜像:
- `docker pull hub.baidubce.com/paddlepaddle/paddle:1.1`
+ `docker pull hub.baidubce.com/paddlepaddle/paddle:1.2`
* 对于需要**GPU版本的PaddlePaddle**的用户请使用以下指令拉取我们为您预安装好*PaddlePaddle For GPU*的镜像:
- `docker pull hub.baidubce.com/paddlepaddle/paddle:1.1-gpu-cuda9.0-cudnn7`
+ `docker pull hub.baidubce.com/paddlepaddle/paddle:1.2-gpu-cuda9.0-cudnn7`
* 您也可以通过以下指令拉取任意的我们提供的Docker镜像:
@@ -173,7 +177,7 @@ Python3.6、Python3.7:(由于版本相对较新,在不同Ubuntu版本上
## ***如何卸载***
-请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令):
+请使用以下命令卸载PaddlePaddle(使用docker安装PaddlePaddle的用户请进入包含PaddlePaddle的容器中使用以下命令,请使用相应版本的pip):
* ***CPU版本的PaddlePaddle***: `pip uninstall paddlepaddle` 或 `pip3 uninstall paddlepaddle`
diff --git a/doc/fluid/beginners_guide/install/install_Windows.md b/doc/fluid/beginners_guide/install/install_Windows.md
index de7970f863f812c6372b523237cf21cca0ba7246..2cea71fabf3a811219c7dbe399f107c2c17ba204 100644
--- a/doc/fluid/beginners_guide/install/install_Windows.md
+++ b/doc/fluid/beginners_guide/install/install_Windows.md
@@ -4,7 +4,11 @@
本说明将介绍如何在*64位台式机或笔记本电脑*以及Windows系统下安装PaddlePaddle,我们支持的Windows系统需满足以下要求。
-请注意:在其他系统上的尝试可能会导致安装失败。
+
+
+请注意:在其他系统上的尝试可能会导致安装失败。 请确保您的环境满足以上条件,我们默认提供的安装同时需要您的计算机处理器支持AVX指令集,否则请选择[多版本whl包安装列表](Tables.html/#ciwhls) 中`no_avx`的版本:
+
+Windows系统下可使用`cpu-z`这类软件来检测您的处理器是否支持AVX指令集
当前版本不支持NCCL,分布式,AVX,warpctc和MKL相关功能。
diff --git a/doc/fluid/beginners_guide/programming_guide/programming_guide.md b/doc/fluid/beginners_guide/programming_guide/programming_guide.md
index 04d542c93c8df86a7c604e1d3c0c5282b5ecb497..204cd195815e71ccdbafb12e88fc3da5bd178804 100644
--- a/doc/fluid/beginners_guide/programming_guide/programming_guide.md
+++ b/doc/fluid/beginners_guide/programming_guide/programming_guide.md
@@ -406,7 +406,7 @@ outs = exe.run(
```
可以看到100次迭代后,预测值已经非常接近真实值了,损失值也从初始值9.05下降到了0.01。
- 恭喜您!已经成功完成了第一个简单网络的搭建,想尝试线性回归的进阶版——房价预测模型,请阅读:[线性回归](../../beginners_guide/quick_start/fit_a_line/README.cn.html)。更多丰富的模型实例可以在[模型库](../../user_guides/models/index.html)中找到。
+ 恭喜您!已经成功完成了第一个简单网络的搭建,想尝试线性回归的进阶版——房价预测模型,请阅读:[线性回归](../../beginners_guide/quick_start/fit_a_line/README.cn.html)。更多丰富的模型实例可以在[模型库](../../user_guides/models/index_cn.html)中找到。
## What's next
diff --git a/doc/fluid/beginners_guide/quick_start/index.rst b/doc/fluid/beginners_guide/quick_start/index.rst
index 2d93e45b904f532e44be9c0bac5d4e30587e4ae8..69e45881ab2efe93dab1a0b5dceca63dae9ef8f0 100644
--- a/doc/fluid/beginners_guide/quick_start/index.rst
+++ b/doc/fluid/beginners_guide/quick_start/index.rst
@@ -2,9 +2,7 @@
快速入门
########
-.. todo::
-
- 概述
+欢迎来到快速入门部分,在这里,我们将向您介绍如何通过PaddlePaddle Fluid实现经典的线性回归和手写识别的模型,以下两篇文档将指导您使用真实数据集搭建起模型、进行训练和预测:
.. toctree::
:titlesonly:
diff --git a/doc/fluid/release_note.rst b/doc/fluid/release_note.rst
index ec0b352952b1bc9bbfdec0d50ab74814edf0d208..e7883aaae120517ecefe5480bbdf2cab850662b3 100644
--- a/doc/fluid/release_note.rst
+++ b/doc/fluid/release_note.rst
@@ -2,75 +2,87 @@
版本说明
==============
-PaddlePaddle v1.1
-#####################
+Paddle Fluid v1.2
+##########################
-PaddlePaddle v1.1 在基础框架、模型建设、分布式训练、预测引擎各个方向上完成多项更新。OP进行了全面完善和优化,模型库新增了自然语言处理、视觉和推荐等领域的大量经典模型,分布式训练能力显著提升,支持千亿规模稀疏参数大规模多机异步训练,预测库易用性和效率提升,移动端预测支持更多模型和更多硬件。详情如下:
+Paddle Fluid v1.2在基础框架、预测引擎、模型建设、分布式训练各个方向上完成多项更新。基础框架支持python3.5及以上全版本。预测引擎优化,预测性能大幅提升。增强了对RL相关的支持能力。模型库新增图像分类任任务的预训练模型、语言模型任务新增基于cudnn的LSTM实现、分布式word2vec模型。CPU多机异步训练升级了包括worker异步并发和IO、通信优化在内多项功能,整体吞吐大幅提升。
基础框架
-=========
+==========
* 安装
- * Mac OS X 10.11及以上pip安装支持。
- * Mac OS X 10.12及以上从源码编译安装支持。
+ * 提供新pip安装包,支持Windows下CPU执行。
* 编程语言
- * Python3的支持(python3.5版本)。
-* IO
- * 新增PyReader,支持用户基于python自定义数据读取和预处理的的高性能数据输入。在ResNet50模型上,单机情况下:单卡数据读取速度提升4%、4卡数据读取速度提升38%、8卡数据读取速度提升60%。
- * 实现一个多进程PyReader decorator,配合PyReader可以实现数据读取性能线性提升。
-* OP优化
- * 优化了 :code:`split operator` ,显著提升性能。
- * 扩展 :code:`multiclass_nms operator` ,支持多边形的预测框。
- * 通过 :code:`generatoe_proposals operator` 的CUDA实现,显著提升性能。
- * 通过 :code:`affine_channel operator` 融合batch_norm operator,显著提升性能。
- * 优化 :code:`depthwise_conv operator` 的forward和backward,显著提升性能。
- * 优化 :code:`reduce_mean operator` 。
- * 优化 :code:`sum operator` ,该operator在输入是 :code:`Tensor` 的情况下,减少一次zero memory耗时。
- * 优化 :code:`top_k operator` ,显著提升性能。
- * 优化 :code:`sequence_pool operator` ,显著提升性能。
- * 优化 :code:`elementwise_add operator` ,显著提升性能。
- * :code:`while operator` 性能优化,相关的模型性能整体提升 30%+。
- * :code:`sequence_slice operator` 的实现,对于一个sequence,可以从指定位置开始,slice出指定长度的subsequence。
- * :code:`sequence_unpad operator` 的实现,支持padding Tensor转LoDTensor。
- * 支持截断正态分布初始化方法(truncated normal initializer)。
- * 二维 :code:`padding operator` 的实现,支持一个每个纬度的首尾padding不同的大小。
- * 更多 operator支持: :code:`sequence_reverse operator` , :code:`sequence_enumerate operator` , :code:`sequence_scatter operator` , :code:`roi_align operator` , :code:`affine_channel operator` , :code:`anchor_generator operator` , :code:`generate_proposal_labels operator` , :code:`generate_proposals operator` , :code:`rpn_target_assign operator` 、 :code:`roi透视变换operator` , :code:`seq_pool operator` 、 :code:`seq_expand operator` 、 :code:`seq_concat operator` 、 :code:`seq_softmax operator` 、 :code:`lod_to_array operator` 、 :code:`array_to_lod operator` 。
-* 显存优化
- * 显存优化策略eager deletion支持control flow (e.g. if-else, while)中子block的优化。显著降低包含control flow的模型的显存开销。
+ * 新增对python3.6、python3.7的支持。
+* 重构内存分配模块Allocator,提升CPU下内存分配策略,提升显存利用率(默认关闭,需要使用FLAGS_allocator_strategy)。
+* 限制SelectedRows的使用。修复了稀疏正则和稀疏优化器的bug。
+* Tensor支持DLPack,方便被其他框架集成和集成其他训练框架。
+* OP
+ * 修复 expand op shape 推理错误的bug
+ * 支持 Selu 激活函数
-模型建设
-=========
-* 自然语言处理方向增加开源语义匹配DAM模型和阅读理解BiDAF模型,机器翻译Transformer模型性能优化后训练速度提升超过30%,模型效果和训练速度均达到业界领先水平。
-* 计算机视觉方向增加开源OCR识别Seq2Seq-Attention模型,目标检测Faster-RCNN模型,图像语义分割DeepLab v3+模型,视频分类TSN模型,图像生成CircleGAN/ConditionalGAN/DCGAN模型,以及Deep Metric Learning模型,模型效果和训练速度均达到业界领先水平。
-* 个性化推荐任务系列模型支持:新闻自动标签模型TagSpace,序列语义召回模型GRU4Rec、SequenceSemanticRetrieval,点击率预估模型DeepCTR,多视角兴趣匹配模型multiview-simnet。
- * TagSpace : TagSpace: Semantic Embeddings from Hashtags。
- * SequenceSemanticRetrieval : Multi-Rate Deep Learning for Temporal Recommendation。
- * multiview-simnet : A Multi-View Deep Learning Approach for Cross Domain User Modeling in Recommendation Systems。
- * GRU4Rec : Session-based Recommendations with Recurrent Neural Networks。
- * DeepCTR : DeepFM: A Factorization-Machine based Neural Network for CTR Prediction。
+预测引擎
+==========
+* 服务器预测
+ * GPU 支持图融合,且支持和 TensorRT引擎混合改图,在Resnet50和Googlenet等图像通用模型上bs=1下性能提升 50%~100%。
+ * GPU支持DDPG Deep Explore预测。
+ * Paddle-TRT对更多模型的支持,其中包括Resnet, SE-Resnet, DPN,GoogleNet。
+ * CPU, GPU, TensorRT 等加速引擎合并入 AnalysisPredictor,统一由 AnalysisConfig 控制。
+ * 增加调用多线程数学库的接口。
+ * 新增TensorRT plugin的支持,包括 :code:`split operator` , :code:`prelu operator` , :code:`avg_pool operator` , :code:`elementwise_mul operator` 。
+ * 增加了JIT CPU Kernel,支持基本的向量操作,以及常见的算法包括ReLU,LSTM和GRU的部分实现,可以实现在AVX和AVX2指令集之间自动runtime切换。
+ * 优化CRF decoding和LayerNorm在AVX以及AVX2指令集上的实现。
+ * 修复了 AnalysisPredictor 在GPU,在CPU 到 GPU 的 transfer data 不删除的问题。
+ * 修复了 Variable 中包含 container 内存持续增长的问题。
+ * 修复 :code:`fc_op` 不支持3-D Tensor的问题。
+ * 修复了Analysis predictor 在GPU下执行pass时的问题。
+ * 修复了TensorRT下运行GoogleNet的问题。
+ * 预测性能提升
+ * Max Sequence pool optimization,单op提高10%。
+ * :code:`Softmax operator` 优化,单op提升14%。
+ * :code:`Layer Norm operator` 优化,支持avx2指令集,单op提升5倍。
+ * :code:`Stack operator` 优化,单op提升3.6倍。
+ * 增加depthwise_conv_mkldnn_pass,加速MobileNet预测。
+ * 加速analysis模式的图分析时间,提升70倍。
+ * DAM开源模型,提升118.8%。
+* 移动端预测
+ * 实现winograd算法, GoogleNet v1性能大幅提升35%。
+ * GoogleNet 8bit优化,相比float加速14%。
+ * MobileNet v1 8bit支持,相比float加速20%。
+ * MobileNet v2 8bit支持,相比float加速19%。
+ * FPGA V1 开发了Deconv算子。
+ * android gpu支持MobileNet、MobileNetSSD、GoogleNet、SqueezeNet、YOLO、ResNet等主流的网络模型。
-* 公开的Quora数据集上,实现并复现了四个公开匹配算法,具有较好的通用性,可应用于NLP、搜索、推荐等场景。
- * cdssmNet:Learning semantic representations using convolutional neural networks for web search 。
- * decAttNet:Neural paraphrase identification of questions with noisy pretraining 。
- * inferSentNet:Supervised learning of universal sentence representations from natural language inference data 。
- * SSENet:Shortcut-stacked sentence encoders for multi-domain inference。
-分布式训练
-==========
-* GPU多机多卡同步训练支持参数同步频率可配置化,在V100上支持的batch size提升为v1.0版本的8倍,通过合理的通信间隔配置,使GPU卡数较少的情况下超大Batch同步训练成为可能,并在优化算法方面保证了收敛效果不变。
-* 支持千亿规模稀疏参数服务器,用于大规模多机异步训练,适用于推荐、广告等领域的点击率预估模型。
+模型建设
+===========
+* CV图像分类任务发布MobileNet V1, ResNet101, ResNet152,VGG11预训练模型。
+* CV Metric Learning模型新增arcmargin损失,并调整训练方式,采用element-wise作为预训练模型,pair-wise继续微调的训练方式提升精度。
+* NLP语言模型任务新增基于cudnn的LSTM实现,对比PaddingRNN的实现方式,在不同参数配置下速度提升3~5倍。
+* 增加分布式word2vec模型,包括新增的tree-based softmax operator,negative sampling等,与经典word2vec算法对齐。
+* 新增GRU4Rec、Tag-Space算法的分布式配置。
+* 完善Multi-view Simnet模型,并增加inference配置。
+* 支持强化学习算法 DQN。
+* 现已支持python3.x的模型:语义匹配DAM,阅读理解BiDAF,机器翻译Transformer,语言模型,强化学习DQN、DoubleDQN模型、DuelingDQN模型,视频分类TSN,度量学习Metric Learning,场景文字识别CRNN-CTC 、OCR Attention,生成式对抗网络ConditionalGAN、DCGAN、CycleGAN,语义分割ICNET、DeepLab v3+,目标检测Faster-RCNN、MobileNet-SSD 、PyramidBox ,图像分类SE-ResNeXt、ResNet等,个性化推荐TagSpace、GRU4Rec、SequenceSemanticRetrieval、DeepCTR、Multiview-Simnet。
+分布式训练
+=============
+* CPU多机异步训练
+ * worker异步并发:增加 :code:`AsyncExecutor` ,以训练文件作为执行粒度,支持分布式训练中的worker端计算异步无锁计算,同时支持单机训练。以CTR任务为例,单机训练速度,在充分利用单机线程的情况下,整体吞吐提升14倍。
+ * IO优化:增加支持 :code:`AsyncExecutor` 的DataFeed,支持可定制化的通用分类任务格式。面向CTR任务,增加CTRReader,使数据读取速度线性提升,在PaddleRec/ctr任务中,整体吞吐提升1倍。
+ * 通信优化:针对稀疏访问的Dense参数例如Embedding,增加稀疏通信机制,以语义匹配任务为例,获取参数的总量可以压缩到1%以下,在搜索真实场景的数据下,整体训练吞吐可以提升50倍。
+* GPU多机同步训练
+ * 修复Transformer、Bert模型下P2P训练模式会Hang住的问题。
-预测引擎
-========
-* 服务器预测
- * 预测库Windows支持。
- * PaddlePredictor C++ 接口稳定版发布,已经实际支持一部分业务上线,并持续向前兼容。
- * 预发布整合了 TensorRT 子图加速方案。运行时自动切割计算子图调用TensorRT加速。目前Paddle TensorRT 依旧在持续开发中,已支持的模型有 AlexNet, MobileNet, ResNet50, VGG19, ResNet, MobileNet-SSD等。
- * 基于图优化的 CPU 加速 feature,实现了 LSTM,GRU 等一系列 operator 的 fuse,理论上可以大幅提升序列相关模型的性能。
- * 增加了部署时 AVX 和 NOAVX 自动切换的feature,可以针对重点模型实现AVX, AVX2, AVX512自动切换。
- * 提升预测库易用性:只需要 include一个头文件和一个库。
- * ICNet 预测性能大幅提升。
-* 移动端预测
- * 树莓派上MobileNet、GoogleNet、ResNet 34等多个模型支持。
- * Mali GPU和Andreno GPU上MobileNet v1模型支持。
- * ZU5、ZU9等FPGA开发板上ResNet 34和ResNet 50模型支持。
+文档
+=========
+* API
+ * 新增13篇API使用指南。
+ * 新增300个API Reference中文文档。
+ * 优化77个API Reference英文文档:包括代码示例、参数说明等。
+* 安装文档
+ * 新增python3.6、python3.7安装说明。
+ * 新增windows pip install安装说明。
+* Book文档
+ * Book文档中的代码示例更改为Low level API。
+* 使用文档
+ * 新增《Operator相关注意事项》,更新《保存与载入模型变量》、《C++预测API介绍》、《使用TensorRT库预测》、《如何贡献代码》等多篇使用文档。
diff --git a/doc/fluid/user_guides/howto/evaluation_and_debugging/index.rst b/doc/fluid/user_guides/howto/evaluation_and_debugging/index.rst
index bb0ec018522fe99d077f1f0775ffd195f4816b60..ae0d7013a0c9a2cfcf55d2b3b4a4088f50726b9d 100644
--- a/doc/fluid/user_guides/howto/evaluation_and_debugging/index.rst
+++ b/doc/fluid/user_guides/howto/evaluation_and_debugging/index.rst
@@ -2,8 +2,14 @@
模型评估/调试
###############
+本部分包括两篇文档:
+
+- `模型评估 <../evaluation_and_debugging/evaluation/metrics.html>`_:介绍常用模型评估指标的构造方法
+
+- `Visual DL 工具 <../evaluation_and_debugging/debug/visualdl.html>`_:介绍如何利用 Visual DL 工具可视化训练过程
+
.. toctree::
- :maxdepth: 1
+ :hidden:
evaluation/metrics.rst
debug/visualdl.md
diff --git a/doc/fluid/user_guides/howto/prepare_data/use_py_reader.rst b/doc/fluid/user_guides/howto/prepare_data/use_py_reader.rst
index 6e1374f99c2e42898a8486da2e70526e66646c9e..7baa069b43de6c0f676ae9ebc4c4e1bf5e3524e6 100644
--- a/doc/fluid/user_guides/howto/prepare_data/use_py_reader.rst
+++ b/doc/fluid/user_guides/howto/prepare_data/use_py_reader.rst
@@ -1,4 +1,4 @@
-.. _user_guide_use_py_reader:
+.. _user_guides_use_py_reader:
############################
使用PyReader读取训练和测试数据
diff --git a/doc/fluid/user_guides/howto/training/cluster_howto.rst b/doc/fluid/user_guides/howto/training/cluster_howto.rst
index 8250fcfbac3a0d089bd4a207bd12d5ec9a7cb40c..7d488cc118e83c136db7968c8971cb13ad20f687 100644
--- a/doc/fluid/user_guides/howto/training/cluster_howto.rst
+++ b/doc/fluid/user_guides/howto/training/cluster_howto.rst
@@ -1,6 +1,6 @@
-.. _cluster_howto
+.. _cluster_howto:
-Fluid分布式训练使用手册
+分布式训练使用手册
====================
分布式训练基本思想
@@ -174,7 +174,7 @@ parameter server上。如果需要使用其他,可以传入其他的方法,
.. code-block:: python
- if role == "TRAINER":
+ if role == "TRAINER":
fluid.memory_optimize(fluid.default_main_program(), skip_grads=True)
t = fluid.DistributeTranspiler()
t.transpile(trainer_id, pservers=pserver_endpoints, trainers=trainers)
diff --git a/doc/fluid/user_guides/howto/training/index.rst b/doc/fluid/user_guides/howto/training/index.rst
index f021e7f3bbde81413d60dc1c94e5c397c9114ae7..e517bf72e7a56889d3e1f9d2b812ea6debf5dc9e 100644
--- a/doc/fluid/user_guides/howto/training/index.rst
+++ b/doc/fluid/user_guides/howto/training/index.rst
@@ -2,7 +2,7 @@
训练神经网络
############
-PaddlePaddle Fluid支持单机训练,和多节点训练。每种训练模式下,都支持多种训练方法。
+PaddlePaddle Fluid支持单机训练和多节点训练。每种训练模式下,都支持多种训练方法,本部分包含以下内容:
.. toctree::
:maxdepth: 1
diff --git a/doc/fluid/user_guides/howto/training/train_on_baidu_cloud_cn.rst b/doc/fluid/user_guides/howto/training/train_on_baidu_cloud_cn.rst
index 76bb9f49220600ebfec78b388bc0a75c0901e746..71d610ad5342a049e1f67fb6650c5081bd128563 100644
--- a/doc/fluid/user_guides/howto/training/train_on_baidu_cloud_cn.rst
+++ b/doc/fluid/user_guides/howto/training/train_on_baidu_cloud_cn.rst
@@ -1,6 +1,6 @@
-.. _train_on_baidu_cloud_cn
+.. _train_on_baidu_cloud_cn:
-在百度云上启动Fluid分布式训练
+在百度云启动Fluid分布式训练
=========================
PaddlePaddle Fluid分布式训练,可以不依赖集群系统(比如MPI,Kubernetes)启动分布式训练。
@@ -113,7 +113,7 @@ PaddlePaddle Fluid分布式训练,可以不依赖集群系统(比如MPI,Ku
exe.run(fluid.default_startup_program())
-
+
for pass_id in range(PASS_NUM):
for batch_id, data in enumerate(train_reader()):
acc_np, avg_loss_np = exe.run(fluid.default_main_program(),
@@ -155,7 +155,7 @@ PaddlePaddle Fluid分布式训练,可以不依赖集群系统(比如MPI,Ku
假设我们创建了2台GPU服务器,ip分别是 :code:`172.16.0.5,172.16.0.6` ,然后在第一台服务器上,
先创建训练程序文件 :code:`dist_train_demo.py` ,从
-`这里 `_
+`这里 `_
下载代码。然后编写 :code:`fabfile.py` 脚本,用于控制在不同服务器上启动训练任务的parameter server和trainer:
.. code-block:: python
@@ -225,4 +225,4 @@ PaddlePaddle Fluid分布式训练,可以不依赖集群系统(比如MPI,Ku
任务执行完成后,不要忘记释放掉GPU集群资源,勾选选择需要释放的服务器,选择“释放”,则会关闭机器并释放资源。
如果需要执行新的任务,可以直接使用之前保存的镜像,启动新的集群,并参照前面的步骤开始训练。
-.. image:: src/release.png
\ No newline at end of file
+.. image:: src/release.png
diff --git a/doc/fluid/user_guides/index.rst b/doc/fluid/user_guides/index.rst
index f828f3d0b8b81af99561080e3010382b40402af8..d65f0c34565d5ab4a544a44bacb13f107b4cddcd 100644
--- a/doc/fluid/user_guides/index.rst
+++ b/doc/fluid/user_guides/index.rst
@@ -6,7 +6,7 @@
如果您已经掌握了新手入门阶段的内容,期望可以针对实际问题建模、搭建自己网络,本模块提供了一些 Fluid 的使用细节供您参考:
- - `基本概念 <../user_guides/howto/basic_concept/index_cn.rst>`_ :介绍了Fluid的基本使用概念
+ - `基本概念 <../user_guides/howto/basic_concept/index_cn.html>`_ :介绍了Fluid的基本使用概念
- `准备数据 <../user_guides/howto/prepare_data/index.html>`_ :介绍使用 Fluid 训练网络时,数据的支持类型及传输方法
@@ -16,9 +16,6 @@
- `模型评估与调试 <../user_guides/howto/evaluation_and_debugging/index.html>`_:介绍在 Fluid 下进行模型评估和调试的方法,包括:
- - `模型评估 <../user_guides/howto/evaluation_and_debugging/evaluation/metrics.html>`_:介绍常用模型评估指标的构造方法
- - `Visual DL 工具 <../user_guides/howto/evaluation_and_debugging/debug/visualdl.html>`_:介绍如何利用 Visual DL 工具可视化训练过程
-
基于 Fluid 复现的多领域经典模型:
- `Fluid 模型库 <../user_guides/models/index_cn.html>`_
diff --git a/doc/fluid/user_guides/models/index_cn.rst b/doc/fluid/user_guides/models/index_cn.rst
index c1edd4b98f09d6618216f627c77e260b506c0425..e1e342416a89308c64f0b7c4ead35c019dc05ac8 100644
--- a/doc/fluid/user_guides/models/index_cn.rst
+++ b/doc/fluid/user_guides/models/index_cn.rst
@@ -194,7 +194,7 @@ SimNet是百度自然语言处理部于2013年自主研发的语义匹配框架
在工业可用的推荐系统中,推荐策略一般会被划分为多个模块串联执行。以新闻推荐系统为例,存在多个可以使用深度学习技术的环节,例如新闻的自动化标注,个性化新闻召回,个性化匹配与排序等。PaddlePaddle对推荐算法的训练提供了完整的支持,并提供了多种模型配置供用户选择。
-- `TagSpace `_
+- `TagSpace `_
- `GRU4Rec `_
- `SequenceSemanticRetrieval `_
- `DeepCTR `_
diff --git a/external/Paddle b/external/Paddle
index 08f927dee74372977fc770082fecadba2e864fd7..81b66db96c1b9c16535bf86e6167da911891e9fb 160000
--- a/external/Paddle
+++ b/external/Paddle
@@ -1 +1 @@
-Subproject commit 08f927dee74372977fc770082fecadba2e864fd7
+Subproject commit 81b66db96c1b9c16535bf86e6167da911891e9fb