From 84ceffd02d5e3082ee78e1d92f575a00536ede94 Mon Sep 17 00:00:00 2001 From: weixing Date: Fri, 20 Apr 2018 10:07:56 +0800 Subject: [PATCH] Fix api display errors in fluid (#10051) --- doc/fluid/api/evaluator.rst | 17 ++++++++---- doc/fluid/api/initializer.rst | 3 +-- doc/fluid/api/optimizer.rst | 43 +++++++++++++++++++++++++++++- doc/fluid/api/regularizer.rst | 13 +++++++++ python/paddle/fluid/evaluator.py | 3 +-- python/paddle/fluid/optimizer.py | 3 ++- python/paddle/fluid/regularizer.py | 5 ++-- 7 files changed, 73 insertions(+), 14 deletions(-) diff --git a/doc/fluid/api/evaluator.rst b/doc/fluid/api/evaluator.rst index ae9daeb7918..f80b87c7d27 100644 --- a/doc/fluid/api/evaluator.rst +++ b/doc/fluid/api/evaluator.rst @@ -5,17 +5,24 @@ evaluator ========= -Accuracy --------- +ChunkEvaluator +-------------- -.. autoclass:: paddle.fluid.evaluator.Accuracy +.. autoclass:: paddle.fluid.evaluator.ChunkEvaluator :members: :noindex: -ChunkEvaluator +EditDistance -------------- -.. autoclass:: paddle.fluid.evaluator.ChunkEvaluator +.. autoclass:: paddle.fluid.evaluator.EditDistance :members: :noindex: +DetectionMAP +-------------- + +.. autoclass:: paddle.fluid.evaluator.DetectionMAP + :members: + :noindex: + diff --git a/doc/fluid/api/initializer.rst b/doc/fluid/api/initializer.rst index f186c9c85a6..2f02c5de097 100644 --- a/doc/fluid/api/initializer.rst +++ b/doc/fluid/api/initializer.rst @@ -67,8 +67,7 @@ XavierInitializer .. autoclass:: paddle.fluid.initializer.XavierInitializer :members: :noindex: - MSRA - ------ + MSRAInitializer ----------------- diff --git a/doc/fluid/api/optimizer.rst b/doc/fluid/api/optimizer.rst index 2f820595c35..7a92caf9b71 100644 --- a/doc/fluid/api/optimizer.rst +++ b/doc/fluid/api/optimizer.rst @@ -47,10 +47,51 @@ DecayedAdagrad :members: :noindex: +SGDOptimizer +------------ + +.. autoclass:: paddle.fluid.optimizer.SGDOptimizer + :members: + :noindex: + +MomentumOptimizer +----------------- + +.. autoclass:: paddle.fluid.optimizer.MomentumOptimizer + :members: + :noindex: + +AdagradOptimizer +---------------- + +.. autoclass:: paddle.fluid.optimizer.AdagradOptimizer + :members: + :noindex: + +AdamOptimizer +------------- + +.. autoclass:: paddle.fluid.optimizer.AdamOptimizer + :members: + :noindex: + +AdamaxOptimizer +--------------- + +.. autoclass:: paddle.fluid.optimizer.AdamaxOptimizer + :members: + :noindex: + +DecayedAdagradOptimizer +----------------------- + +.. autoclass:: paddle.fluid.optimizer.DecayedAdagradOptimizer + :members: + :noindex: + Adadelta -------------- .. autoclass:: paddle.fluid.optimizer.AdadeltaOptimizer :members: :noindex: - diff --git a/doc/fluid/api/regularizer.rst b/doc/fluid/api/regularizer.rst index dc9740c4639..837c67111c6 100644 --- a/doc/fluid/api/regularizer.rst +++ b/doc/fluid/api/regularizer.rst @@ -25,3 +25,16 @@ L2Decay :members: :noindex: +L1DecayRegularizer +--------------------- + +.. autoclass:: paddle.fluid.regularizer.L1DecayRegularizer + :members: + :noindex: + +L2DecayRegularizer +--------------------- + +.. autoclass:: paddle.fluid.regularizer.L2DecayRegularizer + :members: + :noindex: diff --git a/python/paddle/fluid/evaluator.py b/python/paddle/fluid/evaluator.py index 13475025b5c..1ee1d372717 100644 --- a/python/paddle/fluid/evaluator.py +++ b/python/paddle/fluid/evaluator.py @@ -22,7 +22,6 @@ from layer_helper import LayerHelper from initializer import Constant __all__ = [ - 'Accuracy', 'ChunkEvaluator', 'EditDistance', 'DetectionMAP', @@ -273,7 +272,7 @@ class DetectionMAP(Evaluator): input (Variable): The detection results, which is a LoDTensor with shape [M, 6]. The layout is [label, confidence, xmin, ymin, xmax, ymax]. gt_label (Variable): The ground truth label index, which is a LoDTensor - with shape [N, 1]. + with shape [N, 1]. gt_difficult (Variable): Whether this ground truth is a difficult bounding box (bbox), which is a LoDTensor [N, 1]. gt_box (Variable): The ground truth bounding box (bbox), which is a diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index 36503cac6d5..9ae43b3e93e 100644 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -27,7 +27,8 @@ from contextlib import contextmanager __all__ = [ 'SGD', 'Momentum', 'Adagrad', 'Adam', 'Adamax', 'DecayedAdagrad', - 'Adadelta', 'ModelAverage' + 'SGDOptimizer', 'MomentumOptimizer', 'AdagradOptimizer', 'AdamOptimizer', + 'AdamaxOptimizer', 'DecayedAdagradOptimizer', 'Adadelta', 'ModelAverage' ] diff --git a/python/paddle/fluid/regularizer.py b/python/paddle/fluid/regularizer.py index 604c6f9ab36..c006bd9a66d 100644 --- a/python/paddle/fluid/regularizer.py +++ b/python/paddle/fluid/regularizer.py @@ -16,9 +16,8 @@ import framework from . import core __all__ = [ - 'append_regularization_ops', - 'L1Decay', - 'L2Decay', + 'append_regularization_ops', 'WeightDecayRegularizer', 'L1Decay', 'L2Decay', + 'L1DecayRegularizer', 'L2DecayRegularizer' ] -- GitLab