diff --git a/source/api_reference/CMakeLists.txt b/source/api_reference/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..435d6e10fb02e9b2a8147f37da33e8848cc9b98a --- /dev/null +++ b/source/api_reference/CMakeLists.txt @@ -0,0 +1,25 @@ +# configured documentation tools and intermediate build results +set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build") + +# Sphinx cache with pickled ReST documents +set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees") + +# HTML output director +set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html") + +set(IMPORT_PADDLE_STRING "import paddle") +set(IMPORT_PADDLEV2_STRING "import paddle.v2") + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/../../templates/conf.py.en.in" + "${BINARY_BUILD_DIR_EN}/conf.py" + @ONLY) + +sphinx_add_target(paddle_fluid_apis + html + ${BINARY_BUILD_DIR_EN} + ${SPHINX_CACHE_DIR_EN} + ${CMAKE_CURRENT_SOURCE_DIR} + ${SPHINX_HTML_DIR_EN}) + +add_dependencies(paddle_fluid_apis gen_proto_py framework_py_proto copy_paddle_pybind paddle_python) diff --git a/source/api_reference/average.rst b/source/api_reference/average.rst index 48f208301e708964ca781f3b87d842646e73e092..496f5b29875443f0c44f50fcb3ca837f4e7bcd12 100644 --- a/source/api_reference/average.rst +++ b/source/api_reference/average.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_average: - ============= fluid.average ============= diff --git a/source/api_reference/backward.rst b/source/api_reference/backward.rst index 037e96d0c7ac094203ef0d80aa2b497a71304cb6..115e0d24b39928cfc349f72e0a21d6374cd8cd75 100644 --- a/source/api_reference/backward.rst +++ b/source/api_reference/backward.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_backward: - ============== fluid.backward ============== diff --git a/source/api_reference/clip.rst b/source/api_reference/clip.rst index 8d5b531db4ce557fbe23892c4489316e1da66e23..aeefbb95a46e5d5ed46375e388a720fad2711779 100644 --- a/source/api_reference/clip.rst +++ b/source/api_reference/clip.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_clip: - ========== fluid.clip ========== diff --git a/source/api_reference/data b/source/api_reference/data deleted file mode 120000 index 5aa0dd5cb56f08380cc5a6a23ad057f8c1184fa2..0000000000000000000000000000000000000000 --- a/source/api_reference/data +++ /dev/null @@ -1 +0,0 @@ -../../paddle/doc/fluid/api/data \ No newline at end of file diff --git a/source/api_reference/data/data_reader.rst b/source/api_reference/data/data_reader.rst new file mode 100644 index 0000000000000000000000000000000000000000..1a35d0bbc8f9d751f49c7e1fc26feb1bcb3ae7f0 --- /dev/null +++ b/source/api_reference/data/data_reader.rst @@ -0,0 +1,72 @@ +===================== +Data Reader Interface +===================== + + +DataTypes +========= + +.. autofunction:: paddle.v2.data_type.dense_array + :noindex: + +.. autofunction:: paddle.v2.data_type.integer_value + :noindex: + +.. autofunction:: paddle.v2.data_type.integer_value_sequence + :noindex: + +.. autofunction:: paddle.v2.data_type.integer_value_sub_sequence + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_binary_vector + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_binary_vector_sequence + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_binary_vector_sub_sequence + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_float_vector + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_float_vector_sequence + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_float_vector_sub_sequence + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_non_value_slot + :noindex: + +.. autofunction:: paddle.v2.data_type.sparse_value_slot + :noindex: + +.. autoclass:: paddle.v2.data_type.InputType + :members: + :noindex: + +DataFeeder +========== + +.. automodule:: paddle.v2.data_feeder + :members: + :noindex: + +Reader +====== + +.. automodule:: paddle.reader + :members: + :noindex: + +.. automodule:: paddle.reader.creator + :members: + :noindex: + +minibatch +========= + +.. automodule:: paddle.v2.minibatch + :members: + :noindex: diff --git a/source/api_reference/data/dataset.rst b/source/api_reference/data/dataset.rst new file mode 100644 index 0000000000000000000000000000000000000000..e7c8be4452bf55e0967d750c2e624e8e316e9330 --- /dev/null +++ b/source/api_reference/data/dataset.rst @@ -0,0 +1,82 @@ +Dataset +======= + +.. automodule:: paddle.dataset + :members: + :noindex: + +mnist ++++++ + +.. automodule:: paddle.dataset.mnist + :members: + :noindex: + +cifar ++++++ + +.. automodule:: paddle.dataset.cifar + :members: + :noindex: + +conll05 ++++++++ + +.. automodule:: paddle.dataset.conll05 + :members: get_dict,get_embedding,test + :noindex: + +imdb +++++ + +.. automodule:: paddle.dataset.imdb + :members: + :noindex: + +imikolov +++++++++ + +.. automodule:: paddle.dataset.imikolov + :members: + :noindex: + +movielens ++++++++++ + +.. automodule:: paddle.dataset.movielens + :members: + :noindex: + +.. autoclass:: paddle.dataset.movielens.MovieInfo + :noindex: + +.. autoclass:: paddle.dataset.movielens.UserInfo + :noindex: + +sentiment ++++++++++ + +.. automodule:: paddle.dataset.sentiment + :members: + :noindex: + +uci_housing ++++++++++++ + +.. automodule:: paddle.dataset.uci_housing + :members: + :noindex: + +wmt14 ++++++ + +.. automodule:: paddle.dataset.wmt14 + :members: + :noindex: + +wmt16 ++++++ + +.. automodule:: paddle.dataset.wmt16 + :members: + :noindex: diff --git a/source/api_reference/data/image.rst b/source/api_reference/data/image.rst new file mode 100644 index 0000000000000000000000000000000000000000..97651ffa6be56cf3ecaca2caca38a353fa5c1f49 --- /dev/null +++ b/source/api_reference/data/image.rst @@ -0,0 +1,5 @@ +Image Interface +=============== + +.. automodule:: paddle.v2.image + :members: diff --git a/source/api_reference/data_feeder.rst b/source/api_reference/data_feeder.rst index aed1bad8c91fefaee56d5c160ee5b98d6d1ae8cf..11d2890f5b3446e37c3ef31e5a17ebebe169dbc8 100644 --- a/source/api_reference/data_feeder.rst +++ b/source/api_reference/data_feeder.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_data_feeder: - ================= fluid.data_feeder ================= diff --git a/source/api_reference/executor.rst b/source/api_reference/executor.rst index 0345e5b29d7f02a47ef3eb0d1e7d7535058c8137..db2842e7f23e74130a966bb347004bee1ccb08fd 100644 --- a/source/api_reference/executor.rst +++ b/source/api_reference/executor.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_executor: - ============== fluid.executor ============== diff --git a/source/api_reference/fluid.rst b/source/api_reference/fluid.rst index 4b330fdebd6ef82708cbfb0f22bad88bd8651514..51cdfe0c2ed045a5b3247c4fdec9868d756eae86 100644 --- a/source/api_reference/fluid.rst +++ b/source/api_reference/fluid.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid: - ===== fluid ===== diff --git a/source/api_reference/gen_doc.py b/source/api_reference/gen_doc.py index 011480a4a6d0f512d537eec39ed4cb2201d49eeb..02efce2bf8392c62a7600c272bedcadc6563f927 100644 --- a/source/api_reference/gen_doc.py +++ b/source/api_reference/gen_doc.py @@ -48,7 +48,7 @@ class DocGenerator(object): !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): @@ -70,7 +70,7 @@ class DocGenerator(object): def print_item(self, name): item = getattr(self.module, name, None) if item is None: - return + return if isinstance(item, types.TypeType): self.print_class(name) elif isinstance(item, types.FunctionType): @@ -107,10 +107,8 @@ class DocGenerator(object): self.stream.write('\n') def _print_ref_(self, 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)) + self.stream.write(".. _api_{0}_{1}:\n\n".format("_".join( + self.module_name.split(".")), name)) def main(): diff --git a/source/api_reference/index.rst b/source/api_reference/index_en.rst similarity index 100% rename from source/api_reference/index.rst rename to source/api_reference/index_en.rst diff --git a/source/api_reference/initializer.rst b/source/api_reference/initializer.rst index f3fc2f2a67a914c4ed1584ae0f0127a21ecc1a6c..dc0b52b14fd242dfaded1cb9a8e0ab9eb66b0607 100644 --- a/source/api_reference/initializer.rst +++ b/source/api_reference/initializer.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_initializer: - ================= fluid.initializer ================= diff --git a/source/api_reference/io.rst b/source/api_reference/io.rst index f89115537c7c6802b5b81b75aaa99f739bd6e23e..7cee0bc4d9aa2c51517d23a381f14a8f63cc3681 100644 --- a/source/api_reference/io.rst +++ b/source/api_reference/io.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_io: - ======== fluid.io ======== diff --git a/source/api_reference/layers.rst b/source/api_reference/layers.rst index 743f97c3eb966e547db1728670282189a48ccb11..264506a68ae17d081dd58ef4794bf7723f6d021c 100644 --- a/source/api_reference/layers.rst +++ b/source/api_reference/layers.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_layers: - ============ fluid.layers ============ diff --git a/source/api_reference/metrics.rst b/source/api_reference/metrics.rst index 5ac2416bc3a0cec0ddc0414e36035e45a8857446..0f54b2e2eb7ead353215c5dbd529293794e37123 100644 --- a/source/api_reference/metrics.rst +++ b/source/api_reference/metrics.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_metrics: - ============= fluid.metrics ============= diff --git a/source/api_reference/nets.rst b/source/api_reference/nets.rst index 8872f9da38186ff6394c594f042e5c756a5febce..059733af18517257b6821d95fd628a9e13e6e98e 100644 --- a/source/api_reference/nets.rst +++ b/source/api_reference/nets.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_nets: - ========== fluid.nets ========== diff --git a/source/api_reference/optimizer.rst b/source/api_reference/optimizer.rst index 234ce23b7f3816b17a595ff3d084db7c5a7964de..8d792120f2f16a8c92606b343eb4c3d4368bed14 100644 --- a/source/api_reference/optimizer.rst +++ b/source/api_reference/optimizer.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_optimizer: - =============== fluid.optimizer =============== diff --git a/source/api_reference/param_attr.rst b/source/api_reference/param_attr.rst index 25a030fe966ba28942bc9ae44bc22c021e9e64c4..33035bbc7ca5c8d000adeaf1cb79806a3ea64604 100644 --- a/source/api_reference/param_attr.rst +++ b/source/api_reference/param_attr.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_param_attr: - ================ fluid.param_attr ================ diff --git a/source/api_reference/profiler.rst b/source/api_reference/profiler.rst index 30e2a4f43e811a7b0237b55a194d47b2f7b4cdd3..c750a2d588df56728ac7f73051ab7a9e44dee232 100644 --- a/source/api_reference/profiler.rst +++ b/source/api_reference/profiler.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_profiler: - ============== fluid.profiler ============== diff --git a/source/api_reference/recordio_writer.rst b/source/api_reference/recordio_writer.rst index 32440b349d64466a4d299c6956ecb4d0a40305a1..f0c12fd115478a29fbd178b533b7490b2f663717 100644 --- a/source/api_reference/recordio_writer.rst +++ b/source/api_reference/recordio_writer.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_recordio_writer: - ===================== fluid.recordio_writer ===================== diff --git a/source/api_reference/regularizer.rst b/source/api_reference/regularizer.rst index 6bdfbe6dc49bf1dce7488c6f193b71b8ddc3f0fc..987eaea903520d91c284c8da7a8cb066a1648069 100644 --- a/source/api_reference/regularizer.rst +++ b/source/api_reference/regularizer.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_regularizer: - ================= fluid.regularizer ================= diff --git a/source/api_reference/transpiler.rst b/source/api_reference/transpiler.rst index 9c9b3dec91b6cdfa3c57d57201eaa9581621aa3f..d2ac04f1449c32cb414cea1b76d7469bbe9ccb85 100644 --- a/source/api_reference/transpiler.rst +++ b/source/api_reference/transpiler.rst @@ -1,8 +1,6 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_fluid_transpiler: - ================ fluid.transpiler ================ @@ -16,6 +14,15 @@ DistributeTranspiler :members: :noindex: +.. _api_fluid_transpiler_InferenceTranspiler: + +InferenceTranspiler +------------------- + +.. autoclass:: paddle.fluid.transpiler.InferenceTranspiler + :members: + :noindex: + .. _api_fluid_transpiler_memory_optimize: memory_optimize