+
    &j                     L    ^ RI Hu Ht ^ RIHt ^RIHt R.t ! R R]4      t	R# )    NTensor)ModuleChannelShufflec                   x   a a ] tR t^
t oRtR.tV3R lV 3R lltV3R lR ltV3R lR ltV3R	 lt	R
t
VtV ;t# )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.]]]])
groupsc                $   < V ^8  d   QhRS[ RR/# )   r   returnNint)format__classdict__s   "w/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/nn/modules/channelshuffle.py__annotate__ChannelShuffle.__annotate__0   s      s t     c                0   < \         SV `  4        Wn        R # )N)super__init__r   )selfr   	__class__s   &&r   r   ChannelShuffle.__init__0   s    r   c                &   < V ^8  d   QhRS[ RS[ /# )r
   inputr   r   )r   r   s   "r   r   r   4   s     5 5V 5 5r   c                B    \         P                  ! WP                  4      # )z
Runs the forward pass.
)Fchannel_shuffler   )r   r   s   &&r   forwardChannelShuffle.forward4   s       44r   c                    < V ^8  d   QhRS[ /# )r
   r   )str)r   r   s   "r   r   r   :   s     ' 'C 'r   c                     RV P                    2# )z0
Return the extra representation of the module.
zgroups=r   )r   s   &r   
extra_reprChannelShuffle.extra_repr:   s     &&r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r
   r   r   )r   r   s   "r   r   r   
   s     H KI r   r$   )__name__
__module____qualname____firstlineno____doc____constants__r   r   r%   __annotate_func____static_attributes____classdictcell____classcell__)r   r   s   @@r   r   r   
   s:      D JM 5 5' 'a  r   )
torch.nn.functionalnn
functionalr   torchr   moduler   __all__r    r   r   <module>r9      s'        
4'V 4'r   