From 00f7e0cf6fbf0d0b11439719515fd6fe79124f9a Mon Sep 17 00:00:00 2001 From: zkh2016 Date: Fri, 26 Aug 2022 11:48:15 +0000 Subject: [PATCH 1/4] sparse doc --- docs/api/paddle/Overview_cn.rst | 4 +- .../paddle/incubate/sparse/Overview_cn.rst | 49 +++++++++++++++++++ .../sparse/sparse_coo_tensor_cn.rst | 6 +-- .../sparse/sparse_csr_tensor_cn.rst | 6 +-- 4 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 docs/api/paddle/incubate/sparse/Overview_cn.rst rename docs/api/paddle/{ => incubate}/sparse/sparse_coo_tensor_cn.rst (90%) rename docs/api/paddle/{ => incubate}/sparse/sparse_csr_tensor_cn.rst (91%) diff --git a/docs/api/paddle/Overview_cn.rst b/docs/api/paddle/Overview_cn.rst index 498720ea6fa..77ed09e327f 100755 --- a/docs/api/paddle/Overview_cn.rst +++ b/docs/api/paddle/Overview_cn.rst @@ -404,5 +404,5 @@ device 相关 :header: "API 名称", "API 功能" :widths: 10, 30 - " :ref:`paddle.sparse.sparse_coo_tensor` ", "创建一个 COO(Coordinate)格式的稀疏 Tensor" - " :ref:`paddle.sparse.sparse_csr_tensor` ", "创建一个 CSR(Compressed Sparse Row)格式的稀疏 Tensor" + " :ref:`paddle.incubate.sparse.sparse_coo_tensor` ", "创建一个 COO(Coordinate)格式的稀疏 Tensor" + " :ref:`paddle.incubate.sparse.sparse_csr_tensor` ", "创建一个 CSR(Compressed Sparse Row)格式的稀疏 Tensor" diff --git a/docs/api/paddle/incubate/sparse/Overview_cn.rst b/docs/api/paddle/incubate/sparse/Overview_cn.rst new file mode 100644 index 00000000000..2cc2bfd9d47 --- /dev/null +++ b/docs/api/paddle/incubate/sparse/Overview_cn.rst @@ -0,0 +1,49 @@ +.. _cn_overview_paddle: + +paddle.incubate.sparse +--------------------- + +paddle.incubate.sparse 目录包含飞桨框架支持稀疏数据存储和计算相关的API。具体如下: + +- :ref:`稀疏数据结构相关 ` +- :ref:`数学操作API ` +- :ref:`NN相关API ` + +.. __about_sparse_tensor: + +稀疏数据结构相关 +:::::::::::::::::::: + +.. csv-table:: + ::header: "API 名称", "API 功能" + + " :ref: `paddle.incubate.sparse.sparse_coo_tensor ` ", "构造COO格式的SparseTensor" + " :ref: `paddle.incubate.sparse.sparse_csr_tensor ` ", "构造CSR格式的SparseTensor" + + +.. __about_sparse_math: + +数学操作相关 +:::::::::::::::::::: + +.. csv-table:: + ::header: "API 名称", "API 功能" + + " :ref: `paddle.incubate.sparse.abs` ", "绝对值函数" + " :ref: `paddle.incubate.sparse.add` ", "Sparse Tensor逐元素相加" + " :ref: `paddle.incubate.sparse.asin` ", "arcsine函数" + " :ref: `paddle.incubate.sparse.asinh` ", "反双曲正弦函数" + " :ref: `paddle.incubate.sparse.atan` ", "反双曲正切函数" + + +.. __about_sparse_nn: + +NN相关 +:::::::::::::::::::: + +.. csv-table:: + ::header: "API 名称", "API 功能" + + " :ref: `paddle.incubate.sparse.nn.Conv3D` ", "三维卷积" + " :ref: `paddle.incubate.sparse.nn.SubmConv3D` ", "三维的submanifold卷积" + " :ref: `paddle.incubate.sparse.nn.Relu` ", "激活函数" diff --git a/docs/api/paddle/sparse/sparse_coo_tensor_cn.rst b/docs/api/paddle/incubate/sparse/sparse_coo_tensor_cn.rst similarity index 90% rename from docs/api/paddle/sparse/sparse_coo_tensor_cn.rst rename to docs/api/paddle/incubate/sparse/sparse_coo_tensor_cn.rst index 0904930d4de..dadc33bd8f0 100644 --- a/docs/api/paddle/sparse/sparse_coo_tensor_cn.rst +++ b/docs/api/paddle/incubate/sparse/sparse_coo_tensor_cn.rst @@ -1,10 +1,10 @@ -.. _cn_api_paddle_sparse_coo_tensor: +.. _cn_api_paddle_incubate_sparse_coo_tensor: sparse_coo_tensor ------------------------------- -.. py:function:: paddle.sparse.sparse_coo_tensor(indices, values, shape=None, dtype=None, place=None, stop_gradient=True) +.. py:function:: paddle.incubate.sparse.sparse_coo_tensor(indices, values, shape=None, dtype=None, place=None, stop_gradient=True) 该 API 通过已知的非零元素的 ``indices`` 和 ``values`` 来创建一个 coordinate 格式的稀疏 tensor,tensor 类型为 ``paddle.Tensor`` 。 @@ -40,4 +40,4 @@ sparse_coo_tensor 代码示例 ::::::::: -COPY-FROM: paddle.sparse.sparse_coo_tensor +COPY-FROM: paddle.incubate.sparse.sparse_coo_tensor diff --git a/docs/api/paddle/sparse/sparse_csr_tensor_cn.rst b/docs/api/paddle/incubate/sparse/sparse_csr_tensor_cn.rst similarity index 91% rename from docs/api/paddle/sparse/sparse_csr_tensor_cn.rst rename to docs/api/paddle/incubate/sparse/sparse_csr_tensor_cn.rst index 355e8b8675e..0240ec06dcf 100644 --- a/docs/api/paddle/sparse/sparse_csr_tensor_cn.rst +++ b/docs/api/paddle/incubate/sparse/sparse_csr_tensor_cn.rst @@ -1,10 +1,10 @@ -.. _cn_api_paddle_sparse_csr_tensor: +.. _cn_api_paddle_incubate_sparse_csr_tensor: sparse_csr_tensor ------------------------------- -.. py:function:: paddle.sparse.sparse_csr_tensor(crows, cols, values, shape, dtype=None, place=None, stop_gradient=True) +.. py:function:: paddle.incubate.sparse.sparse_csr_tensor(crows, cols, values, shape, dtype=None, place=None, stop_gradient=True) 该 API 通过已知的非零元素的 ``crows`` , ``cols`` 和 ``values`` 来创建一个 CSR(Compressed Sparse Row) 格式的稀疏 tensor,tensor 类型为 ``paddle.Tensor`` 。 @@ -43,4 +43,4 @@ sparse_csr_tensor **代码示例** -COPY-FROM: paddle.sparse.sparse_csr_tensor +COPY-FROM: paddle.incubate.sparse.sparse_csr_tensor From 0fa8cda62e04b9b76061257a97ceea5f63d480a2 Mon Sep 17 00:00:00 2001 From: zkh2016 Date: Fri, 26 Aug 2022 12:46:50 +0000 Subject: [PATCH 2/4] fix doc --- .../paddle/incubate/sparse/Overview_cn.rst | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/api/paddle/incubate/sparse/Overview_cn.rst b/docs/api/paddle/incubate/sparse/Overview_cn.rst index 2cc2bfd9d47..d302b89e25a 100644 --- a/docs/api/paddle/incubate/sparse/Overview_cn.rst +++ b/docs/api/paddle/incubate/sparse/Overview_cn.rst @@ -9,41 +9,41 @@ paddle.incubate.sparse 目录包含飞桨框架支持稀疏数据存储和计算 - :ref:`数学操作API ` - :ref:`NN相关API ` -.. __about_sparse_tensor: +.. _about_sparse_tensor: 稀疏数据结构相关 :::::::::::::::::::: .. csv-table:: - ::header: "API 名称", "API 功能" + :header: "API 名称", "API 功能" - " :ref: `paddle.incubate.sparse.sparse_coo_tensor ` ", "构造COO格式的SparseTensor" - " :ref: `paddle.incubate.sparse.sparse_csr_tensor ` ", "构造CSR格式的SparseTensor" + " :ref:`paddle.incubate.sparse.sparse_coo_tensor ` ", "构造COO格式的SparseTensor" + " :ref:`paddle.incubate.sparse.sparse_csr_tensor ` ", "构造CSR格式的SparseTensor" -.. __about_sparse_math: +.. _about_sparse_math: 数学操作相关 :::::::::::::::::::: .. csv-table:: - ::header: "API 名称", "API 功能" + :header: "API 名称", "API 功能" - " :ref: `paddle.incubate.sparse.abs` ", "绝对值函数" - " :ref: `paddle.incubate.sparse.add` ", "Sparse Tensor逐元素相加" - " :ref: `paddle.incubate.sparse.asin` ", "arcsine函数" - " :ref: `paddle.incubate.sparse.asinh` ", "反双曲正弦函数" - " :ref: `paddle.incubate.sparse.atan` ", "反双曲正切函数" + " :ref:`paddle.incubate.sparse.abs` ", "绝对值函数" + " :ref:`paddle.incubate.sparse.add` ", "Sparse Tensor逐元素相加" + " :ref:`paddle.incubate.sparse.asin` ", "arcsine函数" + " :ref:`paddle.incubate.sparse.asinh` ", "反双曲正弦函数" + " :ref:`paddle.incubate.sparse.atan` ", "反双曲正切函数" -.. __about_sparse_nn: +.. _about_sparse_nn: NN相关 :::::::::::::::::::: .. csv-table:: - ::header: "API 名称", "API 功能" + :header: "API 名称", "API 功能" - " :ref: `paddle.incubate.sparse.nn.Conv3D` ", "三维卷积" - " :ref: `paddle.incubate.sparse.nn.SubmConv3D` ", "三维的submanifold卷积" - " :ref: `paddle.incubate.sparse.nn.Relu` ", "激活函数" + " :ref:`paddle.incubate.sparse.nn.Conv3D` ", "三维卷积" + " :ref:`paddle.incubate.sparse.nn.SubmConv3D` ", "三维的submanifold卷积" + " :ref:`paddle.incubate.sparse.nn.Relu` ", "激活函数" From e30cdce30f50f275e6129a2254ae5c7738bd8460 Mon Sep 17 00:00:00 2001 From: zkh2016 Date: Fri, 26 Aug 2022 13:27:33 +0000 Subject: [PATCH 3/4] update --- docs/api/paddle/incubate/sparse/Overview_cn.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/paddle/incubate/sparse/Overview_cn.rst b/docs/api/paddle/incubate/sparse/Overview_cn.rst index d302b89e25a..ea2aedcfcd0 100644 --- a/docs/api/paddle/incubate/sparse/Overview_cn.rst +++ b/docs/api/paddle/incubate/sparse/Overview_cn.rst @@ -17,8 +17,8 @@ paddle.incubate.sparse 目录包含飞桨框架支持稀疏数据存储和计算 .. csv-table:: :header: "API 名称", "API 功能" - " :ref:`paddle.incubate.sparse.sparse_coo_tensor ` ", "构造COO格式的SparseTensor" - " :ref:`paddle.incubate.sparse.sparse_csr_tensor ` ", "构造CSR格式的SparseTensor" + " :ref:`paddle.incubate.sparse.sparse_coo_tensor ` ", "创建一个COO格式的SparseTensor" + " :ref:`paddle.incubate.sparse.sparse_csr_tensor ` ", "创建一个CSR格式的SparseTensor" .. _about_sparse_math: From 6461dd19c97b76d64800f3b721ecfdd5eb66e262 Mon Sep 17 00:00:00 2001 From: zkh2016 Date: Fri, 2 Sep 2022 06:43:34 +0000 Subject: [PATCH 4/4] format --- .../paddle/incubate/sparse/Overview_cn.rst | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/api/paddle/incubate/sparse/Overview_cn.rst b/docs/api/paddle/incubate/sparse/Overview_cn.rst index ea2aedcfcd0..c328078ba05 100644 --- a/docs/api/paddle/incubate/sparse/Overview_cn.rst +++ b/docs/api/paddle/incubate/sparse/Overview_cn.rst @@ -3,11 +3,11 @@ paddle.incubate.sparse --------------------- -paddle.incubate.sparse 目录包含飞桨框架支持稀疏数据存储和计算相关的API。具体如下: +paddle.incubate.sparse 目录包含飞桨框架支持稀疏数据存储和计算相关的 API。具体如下: - :ref:`稀疏数据结构相关 ` -- :ref:`数学操作API ` -- :ref:`NN相关API ` +- :ref:`数学操作 API ` +- :ref:`NN 相关 API ` .. _about_sparse_tensor: @@ -16,9 +16,9 @@ paddle.incubate.sparse 目录包含飞桨框架支持稀疏数据存储和计算 .. csv-table:: :header: "API 名称", "API 功能" - - " :ref:`paddle.incubate.sparse.sparse_coo_tensor ` ", "创建一个COO格式的SparseTensor" - " :ref:`paddle.incubate.sparse.sparse_csr_tensor ` ", "创建一个CSR格式的SparseTensor" + + " :ref:`paddle.incubate.sparse.sparse_coo_tensor ` ", "创建一个 COO 格式的 SparseTensor" + " :ref:`paddle.incubate.sparse.sparse_csr_tensor ` ", "创建一个 CSR 格式的 SparseTensor" .. _about_sparse_math: @@ -28,22 +28,22 @@ paddle.incubate.sparse 目录包含飞桨框架支持稀疏数据存储和计算 .. csv-table:: :header: "API 名称", "API 功能" - + " :ref:`paddle.incubate.sparse.abs` ", "绝对值函数" - " :ref:`paddle.incubate.sparse.add` ", "Sparse Tensor逐元素相加" - " :ref:`paddle.incubate.sparse.asin` ", "arcsine函数" + " :ref:`paddle.incubate.sparse.add` ", "Sparse Tensor 逐元素相加" + " :ref:`paddle.incubate.sparse.asin` ", "arcsine 函数" " :ref:`paddle.incubate.sparse.asinh` ", "反双曲正弦函数" " :ref:`paddle.incubate.sparse.atan` ", "反双曲正切函数" .. _about_sparse_nn: -NN相关 +NN 相关 :::::::::::::::::::: .. csv-table:: :header: "API 名称", "API 功能" - + " :ref:`paddle.incubate.sparse.nn.Conv3D` ", "三维卷积" - " :ref:`paddle.incubate.sparse.nn.SubmConv3D` ", "三维的submanifold卷积" + " :ref:`paddle.incubate.sparse.nn.SubmConv3D` ", "三维的 submanifold 卷积" " :ref:`paddle.incubate.sparse.nn.Relu` ", "激活函数"