Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docathon][Add CN Doc No.24-25] #6360

Merged
merged 7 commits into from
Jan 19, 2024
Merged

Conversation

zade23
Copy link
Contributor

@zade23 zade23 commented Dec 7, 2023

PR types

Others

PR changes

Docs

Description

中文文档添加任务

#6193

新增中文文档:

  • paddle.sparse.nn.functional.conv2d
  • paddle.sparse.nn.Conv2D

英文文档链接:

序号 API名称 英文文档地址
24 paddle.sparse.nn.functional.conv2D https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/sparse/nn/functional/conv2d_en.html
25 paddle.sparse.nn.Conv2D https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/sparse/nn/Conv2D_en.html

@Xreki @sunzhongkai588

Copy link

paddle-bot bot commented Dec 7, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6360.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具


.. py:function:: paddle.sparse.nn.functional.conv2d(x, weight, bias=None, stride=1, padding=0, dilation=1, groups=1, data_format='NHWC', name=None)

稀疏二维卷积层(sparse convolution2d),根据输入、卷积核、步长(stride)、填充(padding)、空洞大小(dilations)一组参数计算得到输出特征层大小。输入和输出是 NHWC 格式,其中 N 是批尺寸,H 是特征的高度,W 是特征层宽度,C 是通道数。如果 bias_attr 不为 False,卷积计算会添加偏置项。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 空洞大小(dilations)一组参数 -> 空洞大小(dilations)、组参数(groups)
  • 计算得到的是输出特征,而不是输出特征层大小
  • multidimensional SparseCooTensors信息遗漏了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • multidimensional SparseCooTensors信息遗漏了

遗漏信息补充: 输入(Input)和输出(Output)是形状为[N,H,W,C]的多维稀疏坐标格式张量(SparseCooTensors)。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


稀疏二维卷积层(sparse convolution2d),根据输入、卷积核、步长(stride)、填充(padding)、空洞大小(dilations)一组参数计算得到输出特征层大小。输入和输出是 NHWC 格式,其中 N 是批尺寸,H 是特征的高度,W 是特征层宽度,C 是通道数。如果 bias_attr 不为 False,卷积计算会添加偏置项。

对于每个输入 X,方程为:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

方程为 -> 计算公式为

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

其中:

- :math:`X` :输入值,NHWC 格式的 Tensor
- :math:`W` :卷积核值,MCDHW 格式的 Tensor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处与英文文档中的信息不相符

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


**稀疏二维卷积层**

二维稀疏卷积层(Sparse convolution2d layer)根据输入、卷积核、步长(stride)、填充(padding)、空洞大小(dilations)一组参数计算得到输出特征层大小。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体请参考conv2d的review comment检查一遍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@zade23 zade23 requested a review from Xreki January 15, 2024 06:26
Copy link
Collaborator

@Xreki Xreki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the content

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sparse.Overview 也加上相应描述

docs/api/paddle/sparse/nn/Conv2d_cn.rst Outdated Show resolved Hide resolved
@zade23
Copy link
Contributor Author

zade23 commented Jan 18, 2024

sparse.Overview 也加上相应描述

Done @sunzhongkai588

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 40f0b39 into PaddlePaddle:develop Jan 19, 2024
2 checks passed
@zade23 zade23 deleted the en_doc_2425 branch January 19, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants