From af6da442426895eb5c527ce24af2bbe6fb6695dc Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Wed, 22 Apr 2020 15:31:37 +0800 Subject: [PATCH] Init doc preview for paddle.complex (#2013) --- doc/fluid/api/dygraph.rst | 3 +++ doc/fluid/api/fluid.rst | 1 + doc/fluid/api/gen_doc.py | 1 + doc/fluid/api/gen_doc.sh | 9 +++++++++ doc/fluid/api/index_en.rst | 3 ++- doc/fluid/api/nn/loss.rst | 4 ++++ doc/fluid/api/tensor.rst | 1 + doc/fluid/api/tensor/math.rst | 7 +++++++ 8 files changed, 28 insertions(+), 1 deletion(-) diff --git a/doc/fluid/api/dygraph.rst b/doc/fluid/api/dygraph.rst index 56a1a83c4..ac8ca0521 100644 --- a/doc/fluid/api/dygraph.rst +++ b/doc/fluid/api/dygraph.rst @@ -14,6 +14,7 @@ fluid.dygraph dygraph/Conv3DTranspose.rst dygraph/CosineDecay.rst dygraph/DataParallel.rst + dygraph/declarative.rst dygraph/disable_dygraph.rst dygraph/Dropout.rst dygraph/dygraph_to_static_code.rst @@ -28,6 +29,7 @@ fluid.dygraph dygraph/GroupNorm.rst dygraph/GRUUnit.rst dygraph/guard.rst + dygraph/InstanceNorm.rst dygraph/InverseTimeDecay.rst dygraph/Layer.rst dygraph/LayerList.rst @@ -45,6 +47,7 @@ fluid.dygraph dygraph/Pool2D.rst dygraph/PRelu.rst dygraph/prepare_context.rst + dygraph/ProgramTranslator.rst dygraph/save_dygraph.rst dygraph/Sequential.rst dygraph/SpectralNorm.rst diff --git a/doc/fluid/api/fluid.rst b/doc/fluid/api/fluid.rst index 40bd74ef8..1440d541e 100644 --- a/doc/fluid/api/fluid.rst +++ b/doc/fluid/api/fluid.rst @@ -7,6 +7,7 @@ fluid fluid/BuildStrategy.rst fluid/CompiledProgram.rst + fluid/ComplexVariable.rst fluid/cpu_places.rst fluid/CPUPlace.rst fluid/create_lod_tensor.rst diff --git a/doc/fluid/api/gen_doc.py b/doc/fluid/api/gen_doc.py index 9651f206d..9d2557212 100644 --- a/doc/fluid/api/gen_doc.py +++ b/doc/fluid/api/gen_doc.py @@ -21,6 +21,7 @@ import contextlib import paddle.fluid as fluid import paddle.tensor as tensor import paddle.nn as nn +import paddle.complex as complex #import paddle.framework as framework def parse_arg(): diff --git a/doc/fluid/api/gen_doc.sh b/doc/fluid/api/gen_doc.sh index e315fa496..66b30d685 100644 --- a/doc/fluid/api/gen_doc.sh +++ b/doc/fluid/api/gen_doc.sh @@ -25,5 +25,14 @@ done python gen_module_index.py nn paddle.nn +for module in math +do + python gen_doc.py --module_name tensor.${module} --module_prefix tensor.${module} --output tensor/${module} --output_name complex --to_multiple_files True --output_dir complex + python gen_module_index.py complex.tensor.${module} ${module} +done + +python gen_module_index.py complex.tensor tensor +python gen_module_index.py complex paddle.complex + python gen_index.py diff --git a/doc/fluid/api/index_en.rst b/doc/fluid/api/index_en.rst index 0af1c0de6..fee4b69e3 100644 --- a/doc/fluid/api/index_en.rst +++ b/doc/fluid/api/index_en.rst @@ -6,6 +6,7 @@ API Reference :maxdepth: 1 ../api_guides/index_en.rst + complex.rst nn.rst tensor.rst fluid.rst @@ -16,6 +17,7 @@ API Reference dataset.rst dygraph.rst executor.rst + index.rst initializer.rst io.rst layers.rst @@ -24,6 +26,5 @@ API Reference optimizer.rst profiler.rst regularizer.rst - tensor.rst transpiler.rst unique_name.rst diff --git a/doc/fluid/api/nn/loss.rst b/doc/fluid/api/nn/loss.rst index c9b096802..bbbf4faa1 100644 --- a/doc/fluid/api/nn/loss.rst +++ b/doc/fluid/api/nn/loss.rst @@ -5,4 +5,8 @@ loss .. toctree:: :maxdepth: 1 + loss/BCELoss.rst + loss/CrossEntropyLoss.rst loss/L1Loss.rst + loss/MSELoss.rst + loss/NLLLoss.rst diff --git a/doc/fluid/api/tensor.rst b/doc/fluid/api/tensor.rst index f0b73adae..c9b3bac88 100644 --- a/doc/fluid/api/tensor.rst +++ b/doc/fluid/api/tensor.rst @@ -8,3 +8,4 @@ paddle.tensor tensor/linalg.rst tensor/math.rst tensor/random.rst + tensor/stat.rst diff --git a/doc/fluid/api/tensor/math.rst b/doc/fluid/api/tensor/math.rst index 1b28cfecb..0e0218b03 100644 --- a/doc/fluid/api/tensor/math.rst +++ b/doc/fluid/api/tensor/math.rst @@ -6,9 +6,16 @@ math :maxdepth: 1 math/add.rst + math/addcmul.rst + math/addmm.rst math/atan.rst + math/clamp.rst math/div.rst math/elementwise_sum.rst + math/log1p.rst + math/logsumexp.rst + math/max.rst + math/min.rst math/mm.rst math/mul.rst math/pow.rst -- GitLab