|
| 1 | +.. _cn_overview_paddle_sparse: |
| 2 | + |
| 3 | +paddle.sparse |
| 4 | +--------------------- |
| 5 | + |
| 6 | +paddle.sparse 目录包含飞桨框架支持稀疏数据存储和计算相关的 API。具体如下: |
| 7 | + |
| 8 | +- :ref:`稀疏 Tensor 创建 <about_sparse_tensor>` |
| 9 | +- :ref:`稀疏 Tensor 运算 <about_sparse_math>` |
| 10 | +- :ref:`稀疏组网类 <about_sparse_nn>` |
| 11 | +- :ref:`稀疏组网类的函数式 API <about_sparse_nn_functional>` |
| 12 | + |
| 13 | +.. _about_sparse_tensor: |
| 14 | + |
| 15 | +稀疏 Tensor 创建 |
| 16 | +:::::::::::::::::::: |
| 17 | + |
| 18 | +.. csv-table:: |
| 19 | + :header: "API 名称", "API 功能" |
| 20 | + |
| 21 | + " :ref:`paddle.sparse.sparse_coo_tensor <cn_api_paddle_sparse_coo_tensor>` ", "创建一个 COO 格式的 SparseTensor" |
| 22 | + " :ref:`paddle.sparse.sparse_csr_tensor <cn_api_paddle_sparse_csr_tensor>` ", "创建一个 CSR 格式的 SparseTensor" |
| 23 | + |
| 24 | +.. _about_sparse_math: |
| 25 | + |
| 26 | +稀疏 Tensor 运算 |
| 27 | +:::::::::::::::::::: |
| 28 | + |
| 29 | +.. csv-table:: |
| 30 | + :header: "API 名称", "API 功能" |
| 31 | + |
| 32 | + " :ref:`paddle.sparse.sin <cn_api_paddle_sparse_sin>` ", "对稀疏 Tensor 逐元素求正弦" |
| 33 | + " :ref:`paddle.sparse.tan <cn_api_paddle_sparse_tan>` ", "对稀疏 Tensor 逐元素求正切" |
| 34 | + " :ref:`paddle.sparse.asin <cn_api_paddle_sparse_asin>` ", "对稀疏 Tensor 逐元素求反正弦" |
| 35 | + " :ref:`paddle.sparse.atan <cn_api_paddle_sparse_atan>` ", "对稀疏 Tensor 逐元素求反正切" |
| 36 | + " :ref:`paddle.sparse.sinh <cn_api_paddle_sparse_sinh>` ", "对稀疏 Tensor 逐元素求双曲正弦" |
| 37 | + " :ref:`paddle.sparse.tanh <cn_api_paddle_sparse_tanh>` ", "对稀疏 Tensor 逐元素求双曲正切" |
| 38 | + " :ref:`paddle.sparse.asinh <cn_api_paddle_sparse_asinh>` ", "对稀疏 Tensor 逐元素求反双曲正弦" |
| 39 | + " :ref:`paddle.sparse.atanh <cn_api_paddle_sparse_atanh>` ", "对稀疏 Tensor 逐元素求反双曲正切" |
| 40 | + " :ref:`paddle.sparse.sqrt <cn_api_paddle_sparse_sqrt>` ", "对稀疏 Tensor 逐元素求算数平方根" |
| 41 | + " :ref:`paddle.sparse.square <cn_api_paddle_sparse_square>` ", "对稀疏 Tensor 逐元素求平方" |
| 42 | + " :ref:`paddle.sparse.log1p <cn_api_paddle_sparse_log1p>` ", "对稀疏 Tensor 逐元素计算 ln(x+1)" |
| 43 | + " :ref:`paddle.sparse.abs <cn_api_paddle_sparse_abs>` ", "对稀疏 Tensor 逐元素求绝对值" |
| 44 | + " :ref:`paddle.sparse.pow <cn_api_paddle_sparse_pow>` ", "对稀疏 Tensor 逐元素计算 x 的 y 次幂" |
| 45 | + " :ref:`paddle.sparse.cast <cn_api_paddle_sparse_cast>` ", "对稀疏 Tensor 逐元素转换类型" |
| 46 | + " :ref:`paddle.sparse.neg <cn_api_paddle_sparse_neg>` ", "对稀疏 Tensor 逐元素计算相反数" |
| 47 | + " :ref:`paddle.sparse.deg2rad <cn_api_paddle_sparse_deg2rad>` ", "对稀疏 Tensor 逐元素从度转换为弧度" |
| 48 | + " :ref:`paddle.sparse.rad2deg <cn_api_paddle_sparse_rad2deg>` ", "对稀疏 Tensor 逐元素从弧度转换为度" |
| 49 | + " :ref:`paddle.sparse.expm1 <cn_api_paddle_sparse_expm1>` ", "对稀疏 Tensor 逐元素进行以自然数 e 为底的指数运算并减 1" |
| 50 | + " :ref:`paddle.sparse.mv <cn_api_paddle_sparse_mv>` ", "稀疏矩阵乘向量,第一个参数为稀疏矩阵,第二个参数为稠密向量" |
| 51 | + " :ref:`paddle.sparse.matmul <cn_api_paddle_sparse_matmul>` ", "稀疏矩阵乘,第一个参数为稀疏矩阵,第二个参数为稠密矩阵或者稀疏矩阵" |
| 52 | + " :ref:`paddle.sparse.addmm <cn_api_paddle_sparse_addmm>` ", "稀疏矩阵乘与加法的组合运算" |
| 53 | + " :ref:`paddle.sparse.masked_matmul <cn_api_paddle_sparse_masked_matmul>` ", "稀疏矩阵乘,第一、二个参数均为稠密矩阵,返回值为稀疏矩阵" |
| 54 | + " :ref:`paddle.sparse.add <cn_api_paddle_sparse_add>` ", "对稀疏 Tensor 逐元素相加" |
| 55 | + " :ref:`paddle.sparse.subtract <cn_api_paddle_sparse_subtract>` ", "对稀疏 Tensor 逐元素相减" |
| 56 | + " :ref:`paddle.sparse.multiply <cn_api_paddle_sparse_multiply>` ", "对稀疏 Tensor 逐元素相乘" |
| 57 | + " :ref:`paddle.sparse.divide <cn_api_paddle_sparse_divide>` ", "对稀疏 Tensor 逐元素相除" |
| 58 | + " :ref:`paddle.sparse.is_same_shape <cn_api_paddle_sparse_is_same_shape>` ", "判断两个稀疏 Tensor 或稠密 Tensor 的 shape 是否一致" |
| 59 | + " :ref:`paddle.sparse.reshape <cn_api_paddle_sparse_reshape>` ", "改变一个 SparseTensor 的形状" |
| 60 | + " :ref:`paddle.sparse.coalesce<cn_api_paddle_sparse_coalesce>` ", "对 SparseCooTensor 进行排序并合并" |
| 61 | + " :ref:`paddle.sparse.transpose <cn_api_paddle_sparse_transpose>` ", "在不改变数据的情况下改变 ``x`` 的维度顺序, 支持 COO 格式的多维 SparseTensor 以及 COO 格式的 2 维和 3 维 SparseTensor" |
| 62 | + |
| 63 | +.. _about_sparse_nn: |
| 64 | + |
| 65 | +稀疏组网类 |
| 66 | +:::::::::::::::::::: |
| 67 | + |
| 68 | +.. csv-table:: |
| 69 | + :header: "API 名称", "API 功能" |
| 70 | + |
| 71 | + " :ref:`paddle.sparse.nn.ReLU <cn_api_paddle_sparse_nn_ReLU>` ", "激活层" |
| 72 | + " :ref:`paddle.sparse.nn.ReLU6 <cn_api_paddle_sparse_nn_ReLU6>` ", "激活层" |
| 73 | + " :ref:`paddle.sparse.nn.LeakyReLU <cn_api_paddle_sparse_nn_LeakyReLU>` ", "激活层" |
| 74 | + " :ref:`paddle.sparse.nn.Softmax <cn_api_paddle_sparse_nn_Softmax>` ", "激活层" |
| 75 | + " :ref:`paddle.sparse.nn.Conv3D <cn_api_paddle_sparse_nn_Conv3D>` ", "三维卷积层" |
| 76 | + " :ref:`paddle.sparse.nn.SubmConv3D <cn_api_paddle_sparse_nn_SubmConv3D>` ", "子流形三维卷积层" |
| 77 | + " :ref:`paddle.sparse.nn.BatchNorm<cn_api_paddle_sparse_nn_BatchNorm>` ", " Batch Normalization 层" |
| 78 | + " :ref:`paddle.sparse.nn.SyncBatchNorm<cn_api_paddle_sparse_nn_SyncBatchNorm>` ", " Synchronized Batch Normalization 层" |
| 79 | + " :ref:`paddle.sparse.nn.MaxPool3D<cn_api_paddle_sparse_nn_MaxPool3D>` ", "三维最大池化层" |
| 80 | + |
| 81 | +.. _about_sparse_nn_functional: |
| 82 | + |
| 83 | +稀疏组网类函数式 API |
| 84 | +:::::::::::::::::::: |
| 85 | + |
| 86 | +.. csv-table:: |
| 87 | + :header: "API 名称", "API 功能" |
| 88 | + |
| 89 | + " :ref:`paddle.sparse.nn.functional.relu <cn_api_paddle_sparse_nn_functional_relu>` ", "激活函数" |
| 90 | + " :ref:`paddle.sparse.nn.functional.relu6 <cn_api_paddle_sparse_nn_functional_relu6>` ", "激活函数" |
| 91 | + " :ref:`paddle.sparse.nn.functional.leaky_relu <cn_api_paddle_sparse_nn_functional_leaky_relu>` ", "激活函数" |
| 92 | + " :ref:`paddle.sparse.nn.functional.softmax <cn_api_paddle_sparse_nn_functional_softmax>` ", "激活函数" |
| 93 | + " :ref:`paddle.sparse.nn.functional.attention <cn_api_paddle_sparse_nn_functional_attention>` ", "稀疏 attention 函数" |
| 94 | + " :ref:`paddle.sparse.nn.functional.conv3d <cn_api_paddle_sparse_nn_functional_conv3d>` ", "三维卷积函数" |
| 95 | + " :ref:`paddle.sparse.nn.functional.subm_conv3d <cn_api_paddle_sparse_nn_functional_subm_conv3d>` ", "子流形三维卷积函数" |
| 96 | + " :ref:`paddle.sparse.nn.functional.max_pool3d <cn_api_paddle_sparse_nn_functional_max_pool3d>` ", "三维最大池化函数" |
0 commit comments