From 445b8e69a4af0a535ff238d58e201f1d79546e69 Mon Sep 17 00:00:00 2001 From: Tink_Y <31891223+tink2123@users.noreply.github.com> Date: Wed, 19 Dec 2018 13:22:32 +0800 Subject: [PATCH] update api list (#506) (#508) --- doc/fluid/api/index_cn.rst | 26 --------- doc/fluid/api/index_en.rst | 1 - doc/fluid/api/param_attr.rst | 25 --------- doc/fluid/api_cn/index_cn.rst | 1 - doc/fluid/api_cn/param_attr_cn.rst | 90 ------------------------------ 5 files changed, 143 deletions(-) delete mode 100644 doc/fluid/api/index_cn.rst delete mode 100644 doc/fluid/api/param_attr.rst delete mode 100644 doc/fluid/api_cn/param_attr_cn.rst diff --git a/doc/fluid/api/index_cn.rst b/doc/fluid/api/index_cn.rst deleted file mode 100644 index 39a2028d3..000000000 --- a/doc/fluid/api/index_cn.rst +++ /dev/null @@ -1,26 +0,0 @@ -============= -API Reference -============= - -.. toctree:: - :maxdepth: 1 - - fluid.rst - average.rst - backward.rst - clip.rst - data.rst - data_feeder.rst - executor.rst - initializer.rst - io.rst - layers.rst - metrics.rst - nets.rst - optimizer.rst - param_attr.rst - profiler.rst - recordio_writer.rst - regularizer.rst - transpiler.rst - diff --git a/doc/fluid/api/index_en.rst b/doc/fluid/api/index_en.rst index 39a2028d3..e123e6a42 100644 --- a/doc/fluid/api/index_en.rst +++ b/doc/fluid/api/index_en.rst @@ -18,7 +18,6 @@ API Reference metrics.rst nets.rst optimizer.rst - param_attr.rst profiler.rst recordio_writer.rst regularizer.rst diff --git a/doc/fluid/api/param_attr.rst b/doc/fluid/api/param_attr.rst deleted file mode 100644 index 33035bbc7..000000000 --- a/doc/fluid/api/param_attr.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` - !DO NOT EDIT THIS FILE MANUALLY! - -================ -fluid.param_attr -================ - -.. _api_fluid_param_attr_ParamAttr: - -ParamAttr ---------- - -.. autoclass:: paddle.fluid.param_attr.ParamAttr - :members: - :noindex: - -.. _api_fluid_param_attr_WeightNormParamAttr: - -WeightNormParamAttr -------------------- - -.. autoclass:: paddle.fluid.param_attr.WeightNormParamAttr - :members: - :noindex: - diff --git a/doc/fluid/api_cn/index_cn.rst b/doc/fluid/api_cn/index_cn.rst index 21c1ac551..9febfaf1b 100644 --- a/doc/fluid/api_cn/index_cn.rst +++ b/doc/fluid/api_cn/index_cn.rst @@ -18,7 +18,6 @@ API metrics_cn.rst nets_cn.rst optimizer_cn.rst - param_attr_cn.rst profiler_cn.rst regularizer_cn.rst transpiler_cn.rst diff --git a/doc/fluid/api_cn/param_attr_cn.rst b/doc/fluid/api_cn/param_attr_cn.rst deleted file mode 100644 index 1e32d1f8a..000000000 --- a/doc/fluid/api_cn/param_attr_cn.rst +++ /dev/null @@ -1,90 +0,0 @@ -################# - fluid.param_attr -################# - - - - -.. _cn_api_fluid_param_attr_ParamAttr: - - -ParamAttr -------------------------------- - - -.. py:class:: paddle.fluid.param_attr.ParamAttr(name=None, initializer=None, learning_rate=1.0, regularizer=None, trainable=True, gradient_clip=None, do_model_average=False) - -该类代表了参数的各种属性。 为了使神经网络训练过程更加流畅,用户可以根据需要调整参数属性。比如learning rate(学习率), regularization(正则化), trainable(可训练性), do_model_average(平均化模型)和参数初始化方法. - -参数: - - **name** (str) – 参数名。默认为None。 - - **initializer** (Initializer) – 初始化该参数的方法。 默认为None - - **learning_rate** (float) – 参数的学习率。计算方法为 global_lr*parameter_lr∗scheduler_factor。 默认为1.0 - - **regularizer** (WeightDecayRegularizer) – 正则因子. 默认为None - - **trainable** (bool) – 该参数是否可训练。默认为True - - **gradient_clip** (BaseGradientClipAttr) – 减少参数梯度的方法。默认为None - - **do_model_average** (bool) – 该参数是否服从模型平均值。默认为False - -**代码示例** - -.. code-block:: python - - w_param_attrs = fluid.ParamAttr(name="fc_weight", - learning_rate=0.5, - regularizer=fluid.L2Decay(1.0), - trainable=True) - y_predict = fluid.layers.fc(input=x, size=10, param_attr=w_param_attrs) - - - - - - - - - - -.. _cn_api_fluid_param_attr_WeightNormParamAttr: - -WeightNormParamAttr -------------------------------- - -.. py:class:: paddle.fluid.param_attr.WeightNormParamAttr(dim=None, name=None, initializer=None, learning_rate=1.0, regularizer=None, trainable=True, gradient_clip=None, do_model_average=False) - -权重归一化。权范数是神经网络中权向量的再参数化,它将权向量的长度与其方向解耦。该paper对权值归一化的实现进行了讨论: `Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks `_ - -参数: - - **dim** (list) – 参数维度. Default None. - - **name** (str) – 参数名称. Default None. - - **initializer** (Initializer) – 初始化参数的方法. Default None. - - **learning_rate** (float) – 参数的学习率. 优化的参数学习率为 :math:`global\_lr*parameter\_lr*scheduler\_factor` . Default 1.0 - - **regularizer** (WeightDecayRegularizer) – 正则化因子. Default None. - - **trainable** (bool) – 参数是否可训练. Default True. - - **gradient_clip** (BaseGradientClipAttr) – 修剪这个参数的梯度的方法. Default None. - - **do_model_average** (bool) – 这个参数是否应该做模型平均. Default False. - - -**代码示例** - - -.. code-block:: python - - data = fluid.layers.data(name="data", shape=[3, 32, 32], dtype="float32") - fc = fluid.layers.fc(input=data, - size=1000, - param_attr=WeightNormParamAttr( - dim=None, - name='weight_norm_param')) - - - - - - - - - - - - - -- GitLab