Skip to content

Commit

Permalink
更新channel_shuffle的文档
Browse files Browse the repository at this point in the history
  • Loading branch information
BrilliantYuKaimin committed Apr 19, 2022
1 parent 2362233 commit dd9be7f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions python/paddle/nn/functional/vision.py
Expand Up @@ -351,17 +351,19 @@ def channel_shuffle(x, groups, data_format="NCHW", name=None):
"""
This API implements channel shuffle operation.
See more details in :ref:`api_nn_vision_ChannelShuffle` .
Parameters:
x(Tensor): 4-D tensor, the data type should be float32 or float64.
groups(int): Number of groups to divide channels in.
data_format (str): The data format of the input and output data. An optional string from: "NCHW", "NHWC". The default is "NCHW". When it is "NCHW", the data is stored in the order of: [batch_size, input_channels, input_height, input_width].
name (str, optional): The default value is None. Normally there is no need for user to set this property.
x (Tensor): 4-D tensor, the data type should be float32 or float64.
groups (int): Number of groups to divide channels in.
data_format (str): The data format of the input and output data. An optional string of NCHW or NHWC. The default is NCHW. When it is NCHW, the data is stored in the order of [batch_size, input_channels, input_height, input_width].
name (str, optional): Name for the operation (optional, default is None). Normally there is no need for user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Out(tensor): Rearranged tensor keeping the original tensor shape.
Raises:
ValueError: If the number of groups cannot divide the channels of input.
Out (Tensor): Rearranged tensor keeping the original tensor shape.
Examples:
.. code-block:: python
:name: channel_shuffle-example
import paddle
import paddle.nn.functional as F
Expand Down

0 comments on commit dd9be7f

Please sign in to comment.