From dd9be7f156c24aef430e72e35e6c5e5952621311 Mon Sep 17 00:00:00 2001 From: BrilliantYuKaimin <91609464+BrilliantYuKaimin@users.noreply.github.com> Date: Tue, 19 Apr 2022 13:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0channel=5Fshuffle=E7=9A=84?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/paddle/nn/functional/vision.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/python/paddle/nn/functional/vision.py b/python/paddle/nn/functional/vision.py index a8ba2b4a3e01f..07e68d71dc1f1 100644 --- a/python/paddle/nn/functional/vision.py +++ b/python/paddle/nn/functional/vision.py @@ -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