ó
    !Eñi’  ã                   óJ   • S SK Js  Jr  S SKJr  SSKJr  S/r " S S\5      r	g)é    N)ÚTensoré   )ÚModuleÚChannelShufflec                   ój   ^ • \ rS rSr% SrS/r\\S'   S\SS4U 4S jjrS\	S\	4S jr
S\4S	 jrS
rU =r$ )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                 ó.   >• [         TU ]  5         Xl        g )N)ÚsuperÚ__init__r	   )Úselfr	   Ú	__class__s     €Ú\/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/nn/modules/channelshuffle.pyr   ÚChannelShuffle.__init__0   s   ø€ Ü‰ÑÔØ�ó    Úinputc                 óB   • [         R                  " XR                  5      $ )z
Runs the forward pass.
)ÚFÚchannel_shuffler	   )r   r   s     r   ÚforwardÚChannelShuffle.forward4   s   € ô × Ò  ¯©Ó4Ð4r   c                 ó    • SU R                    3$ )z0
Return the extra representation of the module.
zgroups=©r	   )r   s    r   Ú
extra_reprÚChannelShuffle.extra_repr:   s   € ð ˜Ÿ™˜Ð&Ð&r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__constants__ÚintÚ__annotations__r   r   r   Ústrr   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r   
   sN   ø‡ ñ ð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'   ðß Ð Ý å ð Ð
€ô4'�Võ 4'r   