mindspore.ops.channel_shuffle ============================= .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/br_base/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/br_base/docs/api/api_python/ops/mindspore.ops.func_channel_shuffle.rst :alt: 查看源文件 .. py:function:: mindspore.ops.channel_shuffle(x, groups) 将shape为 :math:`(*, C, H, W)` 的tensor的通道划分成 :math:`g` 组,并按如下方式重新排列 :math:`(*, \frac{C}{g}, g, H*W)` ,同时在最终输出中保持原始tensor的shape。 参数: - **x** (Tensor) - 输入tensor。 - **groups** (int) - 通道划分数目。 返回: Tensor