Ë
    [^(h  ã                   óJ   — d dl mc mZ d dlmZ ddlmZ dgZ G d„ de«      Z	y)é    N)ÚTensoré   )ÚModuleÚChannelShufflec                   óZ   ‡ — e Zd ZU dZdgZeed<   deddfˆ fd„Zdedefd„Z	de
fd„Zˆ xZS )	r   a'  Divides and rearranges the channels in a tensor.

    This operation divides the channels in a tensor of shape :math:`(N, C, *)`
    into g groups as :math:`(N, \frac{C}{g}, g, *)` and shuffles them,
    while retaining the original tensor shape in the final output.

    Args:
        groups (int): number of groups to divide channels in.

    Examples::

        >>> channel_shuffle = nn.ChannelShuffle(2)
        >>> input = torch.arange(1, 17, dtype=torch.float32).view(1, 4, 2, 2)
        >>> input
        tensor([[[[ 1.,  2.],
                  [ 3.,  4.]],
                 [[ 5.,  6.],
                  [ 7.,  8.]],
                 [[ 9., 10.],
                  [11., 12.]],
                 [[13., 14.],
                  [15., 16.]]]])
        >>> output = channel_shuffle(input)
        >>> output
        tensor([[[[ 1.,  2.],
                  [ 3.,  4.]],
                 [[ 9., 10.],
                  [11., 12.]],
                 [[ 5.,  6.],
                  [ 7.,  8.]],
                 [[13., 14.],
                  [15., 16.]]]])
    ÚgroupsÚreturnNc                 ó0   •— t         ‰| �  «        || _        y ©N)ÚsuperÚ__init__r   )Úselfr   Ú	__class__s     €ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/nn/modules/channelshuffle.pyr   zChannelShuffle.__init__0   s   ø€ Ü‰ÑÔØˆ�ó    Úinputc                 óB   — t        j                  || j                  «      S r   )ÚFÚchannel_shuffler   )r   r   s     r   ÚforwardzChannelShuffle.forward4   s   € Ü× Ñ  ¨¯©Ó4Ð4r   c                 ó    — d| j                   › �S )Nzgroups=)r   )r   s    r   Ú
extra_reprzChannelShuffle.extra_repr7   s   € Ø˜Ÿ™˜Ð&Ð&r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__constants__ÚintÚ__annotations__r   r   r   Ústrr   Ú__classcell__)r   s   @r   r   r   
   sI   ø… ñ ðD �J€MØƒKð˜sð  tõ ð5˜Vð 5¨ó 5ð'˜C÷ 'r   )
Útorch.nn.functionalÚnnÚ
functionalr   Útorchr   Úmoduler   Ú__all__r   © r   r   ú<module>r)      s'   ðß Ð Ý å ð Ð
€ô.'�Võ .'r   