Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#15 from pkuyym/configure_simple_net
Browse files Browse the repository at this point in the history
Add doc for simple model configuration.
  • Loading branch information
reyoung authored Jun 27, 2018
2 parents 7d5e0e2 + 9c8a4ef commit 690efc6
Show file tree
Hide file tree
Showing 21 changed files with 257 additions and 58 deletions.
2 changes: 2 additions & 0 deletions source/api_reference/average.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_average:

=============
fluid.average
=============
Expand Down
2 changes: 2 additions & 0 deletions source/api_reference/backward.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_backward:

==============
fluid.backward
==============
Expand Down
18 changes: 2 additions & 16 deletions source/api_reference/clip.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_clip:

==========
fluid.clip
==========
Expand Down Expand Up @@ -41,19 +43,3 @@ GradientClipByGlobalNorm
:members:
:noindex:

.. _api_fluid_clip_append_gradient_clip_ops:

append_gradient_clip_ops
------------------------

.. autofunction:: paddle.fluid.clip.append_gradient_clip_ops
:noindex:

.. _api_fluid_clip_error_clip_callback:

error_clip_callback
-------------------

.. autofunction:: paddle.fluid.clip.error_clip_callback
:noindex:

2 changes: 2 additions & 0 deletions source/api_reference/data_feeder.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_data_feeder:

=================
fluid.data_feeder
=================
Expand Down
10 changes: 6 additions & 4 deletions source/api_reference/executor.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_executor:

==============
fluid.executor
==============
Expand Down Expand Up @@ -30,12 +32,12 @@ scope_guard
.. autofunction:: paddle.fluid.executor.scope_guard
:noindex:

.. _api_fluid_executor_switch_scope:
.. _api_fluid_executor__switch_scope:

switch_scope
------------
_switch_scope
-------------

.. autofunction:: paddle.fluid.executor.switch_scope
.. autofunction:: paddle.fluid.executor._switch_scope
:noindex:

.. _api_fluid_executor_fetch_var:
Expand Down
44 changes: 24 additions & 20 deletions source/api_reference/fluid.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid:

=====
fluid
=====
Expand Down Expand Up @@ -65,22 +67,6 @@ program_guard
.. autofunction:: paddle.fluid.program_guard
:noindex:

.. _api_fluid_switch_startup_program:

switch_startup_program
----------------------

.. autofunction:: paddle.fluid.switch_startup_program
:noindex:

.. _api_fluid_switch_main_program:

switch_main_program
-------------------

.. autofunction:: paddle.fluid.switch_main_program
:noindex:

.. _api_fluid_get_var:

get_var
Expand Down Expand Up @@ -114,12 +100,12 @@ scope_guard
.. autofunction:: paddle.fluid.scope_guard
:noindex:

.. _api_fluid_switch_scope:
.. _api_fluid__switch_scope:

switch_scope
------------
_switch_scope
-------------

.. autofunction:: paddle.fluid.switch_scope
.. autofunction:: paddle.fluid._switch_scope
:noindex:

.. _api_fluid_fetch_var:
Expand Down Expand Up @@ -243,6 +229,15 @@ Inferencer
:members:
:noindex:

.. _api_fluid_DistributeTranspiler:

DistributeTranspiler
--------------------

.. autoclass:: paddle.fluid.DistributeTranspiler
:members:
:noindex:

.. _api_fluid_memory_optimize:

memory_optimize
Expand Down Expand Up @@ -374,3 +369,12 @@ DataFeeder
:members:
:noindex:

.. _api_fluid_Scope:

Scope
-----

.. autoclass:: paddle.fluid.Scope
:members:
:noindex:

9 changes: 5 additions & 4 deletions source/api_reference/gen_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, module_name=None, stream=sys.stdout):
!DO NOT EDIT THIS FILE MANUALLY!
''')

self._print_ref_raw_("_".join(self.module_name.split(".")))
self._print_header_(self.module_name, dot='=', is_title=True)

def print_submodule(self, submodule_name):
Expand Down Expand Up @@ -107,9 +107,10 @@ def _print_header_(self, name, dot, is_title):
self.stream.write('\n')

def _print_ref_(self, name):
self.stream.write(".. _api_{0}_{1}:\n\n".format(
"_".join(self.module_name.split(".")), name
))
self._print_ref_raw_("_".join(self.module_name.split(".") + [name]))

def _print_ref_raw_(self, anchor):
self.stream.write(".. _api_{0}:\n\n".format(anchor))


def main():
Expand Down
20 changes: 20 additions & 0 deletions source/api_reference/initializer.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_initializer:

=================
fluid.initializer
=================
Expand Down Expand Up @@ -50,6 +52,15 @@ Bilinear
:members:
:noindex:

.. _api_fluid_initializer_MSRA:

MSRA
----

.. autoclass:: paddle.fluid.initializer.MSRA
:members:
:noindex:

.. _api_fluid_initializer_force_init_on_cpu:

force_init_on_cpu
Expand Down Expand Up @@ -111,3 +122,12 @@ BilinearInitializer
:members:
:noindex:

.. _api_fluid_initializer_MSRAInitializer:

MSRAInitializer
---------------

.. autoclass:: paddle.fluid.initializer.MSRAInitializer
:members:
:noindex:

2 changes: 2 additions & 0 deletions source/api_reference/io.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_io:

========
fluid.io
========
Expand Down
10 changes: 10 additions & 0 deletions source/api_reference/layers.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_layers:

============
fluid.layers
============
Expand Down Expand Up @@ -910,6 +912,14 @@ log
.. autofunction:: paddle.fluid.layers.log
:noindex:

.. _api_fluid_layers_crop:

crop
----

.. autofunction:: paddle.fluid.layers.crop
:noindex:

ops
===

Expand Down
20 changes: 20 additions & 0 deletions source/api_reference/metrics.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_metrics:

=============
fluid.metrics
=============
Expand All @@ -23,6 +25,24 @@ CompositeMetric
:members:
:noindex:

.. _api_fluid_metrics_Precision:

Precision
---------

.. autoclass:: paddle.fluid.metrics.Precision
:members:
:noindex:

.. _api_fluid_metrics_Recall:

Recall
------

.. autoclass:: paddle.fluid.metrics.Recall
:members:
:noindex:

.. _api_fluid_metrics_Accuracy:

Accuracy
Expand Down
2 changes: 2 additions & 0 deletions source/api_reference/nets.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_nets:

==========
fluid.nets
==========
Expand Down
29 changes: 29 additions & 0 deletions source/api_reference/optimizer.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_optimizer:

===============
fluid.optimizer
===============
Expand Down Expand Up @@ -59,6 +61,15 @@ DecayedAdagrad
:members:
:noindex:

.. _api_fluid_optimizer_Ftrl:

Ftrl
----

.. autoclass:: paddle.fluid.optimizer.Ftrl
:members:
:noindex:

.. _api_fluid_optimizer_SGDOptimizer:

SGDOptimizer
Expand Down Expand Up @@ -122,6 +133,15 @@ RMSPropOptimizer
:members:
:noindex:

.. _api_fluid_optimizer_FtrlOptimizer:

FtrlOptimizer
-------------

.. autoclass:: paddle.fluid.optimizer.FtrlOptimizer
:members:
:noindex:

.. _api_fluid_optimizer_Adadelta:

Adadelta
Expand Down Expand Up @@ -149,3 +169,12 @@ Optimizer
:members:
:noindex:

.. _api_fluid_optimizer_RMSPropOptimizer:

RMSPropOptimizer
----------------

.. autoclass:: paddle.fluid.optimizer.RMSPropOptimizer
:members:
:noindex:

2 changes: 2 additions & 0 deletions source/api_reference/param_attr.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_param_attr:

================
fluid.param_attr
================
Expand Down
2 changes: 2 additions & 0 deletions source/api_reference/profiler.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_profiler:

==============
fluid.profiler
==============
Expand Down
2 changes: 2 additions & 0 deletions source/api_reference/recordio_writer.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}`
!DO NOT EDIT THIS FILE MANUALLY!
.. _api_fluid_recordio_writer:

=====================
fluid.recordio_writer
=====================
Expand Down
Loading

0 comments on commit 690efc6

Please sign in to comment.