-
Notifications
You must be signed in to change notification settings - Fork 762
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
【PaddlePaddle Hackathon 2】24、为 Paddle 新增 nn.ChannelShuffle 组网 API #4501
【PaddlePaddle Hackathon 2】24、为 Paddle 新增 nn.ChannelShuffle 组网 API #4501
Conversation
Thanks for your contribution! |
形状 | ||
::::::::: | ||
- **x** (Tensor): 默认形状为 (批大小,通道数,高度,宽度),即NCHW格式的4-D Tensor。其数据类型为float32, float64; | ||
- **output** (Tensor): 其形状与数据类型均和输入相同。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意标点符号的正确使用~ 参考文档
# [[0.40000001]], | ||
# [[0.10000000]], | ||
# [[0.30000001]], | ||
# [[0.50000000]]]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码示例建议使用copy-from的方式,保持和英文的一致,文档参考
- **x** (Tensor): 当前算子的输入,其是一个形状为 `[N, C, H, W]` 的4-D Tensor。其中 `N` 是batch size,`C` 是通道数,`H` 是输入特征的高度,`W` 是输入特征的宽度。其数据类型为float32或者float64; | ||
- **groups** (int): 要把通道分成的组数; | ||
- **data_format** (str,可选): 数据格式,可选: "NCHW"或"NHWC",默认: "NCHW"; | ||
- **name** (str,可选): 操作的名称(可选,默认值为None)。更多信息请参见 :ref:`api_guide_Name`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同ChannelShuffle,「:」--> 「-」
# [[0.40000001]], | ||
# [[0.10000000]], | ||
# [[0.30000001]], | ||
# [[0.50000000]]]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码示例建议使用copy-from的方式,保持和英文的一致
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
增加nn.ChannelShuffle和nn.functional.channel_shuffle说明文档。
该算子实现的PR为PaddlePaddle/Paddle#40743
PADDLEPADDLE_PR=40743