§
    �Štj’  ã                   óR   — 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	dS )é    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                 óV   •— t          ¦   «                              ¦   «          || _        d S )N)ÚsuperÚ__init__r   )Úselfr   Ú	__class__s     €ú]/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/torch/nn/modules/channelshuffle.pyr   zChannelShuffle.__init__0   s$   ø€ Ý‰Œ×ÒÑÔÐØˆŒˆˆó    Úinputc                 ó6   — t          j        || j        ¦  «        S )z(
        Runs the forward pass.
        )ÚFÚchannel_shuffler   )r   r   s     r   ÚforwardzChannelShuffle.forward4   s   € õ Ô  ¨¬Ñ4Ô4Ð4r   c                 ó   — d| j         › �S )z@
        Return the extra representation of the module.
        zgroups=)r   )r   s    r   Ú
extra_reprzChannelShuffle.extra_repr:   s   € ð '˜œÐ&Ð&Ð&r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__constants__ÚintÚ__annotations__r   r   r   Ústrr   Ú__classcell__)r   s   @r   r   r   
   s§   ø€ € € € € € ð ð  ðD �J€MØ€K€K�Kð˜sð  tð ð ð ð ð ð ð5˜Vð 5¨ð 5ð 5ð 5ð 5ð'˜Cð 'ð 'ð 'ð 'ð 'ð 'ð 'ð 'r   )
Útorch.nn.functionalÚnnÚ
functionalr   Útorchr   Úmoduler   Ú__all__r   © r   r   ú<module>r(      s‚   ðØ Ð Ð Ð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð ð Ð
€ð4'ð 4'ð 4'ð 4'ð 4'�Vñ 4'ô 4'ð 4'ð 4'ð 4'r   