+
    ˜°³jl  ã                   ód   € ^ RI Hu Ht ^ RIHt ^RIHt RR.t ! R R]4      t	 ! R R]4      t
R# )é    N©ÚTensor)ÚModuleÚPixelShuffleÚPixelUnshufflec                   ó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ç  Rearrange elements in a tensor according to an upscaling factor.

Rearranges elements in a tensor of shape :math:`(*, C \times r^2, H, W)`
to a tensor of shape :math:`(*, C, H \times r, W \times r)`, where r is an upscale factor.

This is useful for implementing efficient sub-pixel convolution
with a stride of :math:`1/r`.

See the paper:
`Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network`_
by Shi et al. (2016) for more details.

Args:
    upscale_factor (int): factor to increase spatial resolution by

Shape:
    - Input: :math:`(*, C_{in}, H_{in}, W_{in})`, where * is zero or more batch dimensions
    - Output: :math:`(*, C_{out}, H_{out}, W_{out})`, where

.. math::
    C_{out} = C_{in} \div \text{upscale\_factor}^2

.. math::
    H_{out} = H_{in} \times \text{upscale\_factor}

.. math::
    W_{out} = W_{in} \times \text{upscale\_factor}

Examples::

    >>> pixel_shuffle = nn.PixelShuffle(3)
    >>> input = torch.randn(1, 9, 4, 4)
    >>> output = pixel_shuffle(input)
    >>> print(output.size())
    torch.Size([1, 1, 12, 12])

.. _Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network:
    https://arxiv.org/abs/1609.05158
Úupscale_factorc                ó$   <€ V ^8„  d   QhRS[ RR/# )é   r	   ÚreturnN©Úint)ÚformatÚ__classdict__s   "€Ú^/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/nn/modules/pixelshuffle.pyÚ__annotate__ÚPixelShuffle.__annotate__6   s   ø€ ÷ -ñ -¡sð -¨tñ -ó    c                ó0   <€ \         SV `  4        Wn        R # ©N)ÚsuperÚ__init__r	   )Úselfr	   Ú	__class__s   &&€r   r   ÚPixelShuffle.__init__6   s   ø€ Ü‰ÑÔØ,Ör   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# ©r   Úinputr   r   )r   r   s   "€r   r   r   :   s   ø€ ÷ ;ñ ;™Vð ;©ñ ;r   c                óB   € \         P                  ! WP                  4      # ©z
Runs the forward pass.
)ÚFÚpixel_shuffler	   ©r   r   s   &&r   ÚforwardÚPixelShuffle.forward:   s   € ô �Š˜u×&9Ñ&9Ó:Ð:r   c                ó    <€ V ^8„  d   QhRS[ /# ©r   r   ©Ústr)r   r   s   "€r   r   r   @   s   ø€ ÷ 7ñ 7™Cñ 7r   c                ó    € RV P                    2# )ú0
Return the extra representation of the module.
zupscale_factor=©r	   ©r   s   &r   Ú
extra_reprÚPixelShuffle.extra_repr@   s   € ð ! ×!4Ñ!4Ð 5Ð6Ð6r   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # )r   r	   r   )r   r   s   "€r   r   r   
   s   ø‡ ‚ ñT ÑòU r   r,   ©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__constants__r   r$   r.   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r   r   s   @@r   r   r   
   s;   ù‡ € ñ&ðP &Ð&€M÷-ó -÷;ð ;÷7ð 7÷m … r   c                   óx   a a€ ] tR t^Gt 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³  Reverse the PixelShuffle operation.

Reverses the :class:`~torch.nn.PixelShuffle` operation by rearranging elements
in a tensor of shape :math:`(*, C, H \times r, W \times r)` to a tensor of shape
:math:`(*, C \times r^2, H, W)`, where r is a downscale factor.

See the paper:
`Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network`_
by Shi et al. (2016) for more details.

Args:
    downscale_factor (int): factor to decrease spatial resolution by

Shape:
    - Input: :math:`(*, C_{in}, H_{in}, W_{in})`, where * is zero or more batch dimensions
    - Output: :math:`(*, C_{out}, H_{out}, W_{out})`, where

.. math::
    C_{out} = C_{in} \times \text{downscale\_factor}^2

.. math::
    H_{out} = H_{in} \div \text{downscale\_factor}

.. math::
    W_{out} = W_{in} \div \text{downscale\_factor}

Examples::

    >>> pixel_unshuffle = nn.PixelUnshuffle(3)
    >>> input = torch.randn(1, 1, 12, 12)
    >>> output = pixel_unshuffle(input)
    >>> print(output.size())
    torch.Size([1, 9, 4, 4])

.. _Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network:
    https://arxiv.org/abs/1609.05158
Údownscale_factorc                ó$   <€ V ^8„  d   QhRS[ RR/# )r   r>   r   Nr   )r   r   s   "€r   r   ÚPixelUnshuffle.__annotate__q   s   ø€ ÷ 1ñ 1©ð 1°ñ 1r   c                ó0   <€ \         SV `  4        Wn        R # r   )r   r   r>   )r   r>   r   s   &&€r   r   ÚPixelUnshuffle.__init__q   s   ø€ Ü‰ÑÔØ 0Ör   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r   r   )r   r   s   "€r   r   r@   u   s   ø€ ÷ ?ñ ?™Vð ?©ñ ?r   c                óB   € \         P                  ! WP                  4      # r    )r!   Úpixel_unshuffler>   r#   s   &&r   r$   ÚPixelUnshuffle.forwardu   s   € ô × Ò  ×(=Ñ(=Ó>Ð>r   c                ó    <€ V ^8„  d   QhRS[ /# r'   r(   )r   r   s   "€r   r   r@   {   s   ø€ ÷ ;ñ ;™Cñ ;r   c                ó    € RV P                    2# )r+   zdownscale_factor=©r>   r-   s   &r   r.   ÚPixelUnshuffle.extra_repr{   s   € ð # 4×#8Ñ#8Ð"9Ð:Ð:r   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # )r   r>   r   )r   r   s   "€r   r   r@   G   s   ø‡ ‚ ñP ÑòQ r   rI   r1   r<   s   @@r   r   r   G   s;   ù‡ € ñ$ðL (Ð(€M÷1ó 1÷?ð ?÷;ð ;÷i … r   )Útorch.nn.functionalÚnnÚ
functionalr!   Útorchr   Úmoduler   Ú__all__r   r   © r   r   Ú<module>rS      s7   ðß Ð Ý å ð Ð+Ð
,€ô:7�6ô :7ôz8;�Vö 8;r   