+
    åûj¦w  ã                  ó  € R t ^ RIHt ^ RIHtHtHt ^ RIt^ RIH	u H
t ^ RIH	t	 R R ltR R ltR	 R
 ltR R ltR R lt ! R R]	P"                  4      t ! R R]	P"                  4      tRR R lltRR R lltR R ltR# )zJStrict non-maxima suppression of 2D response maps and 3D response volumes.)Úannotations)ÚAnyÚListÚTupleN)Únnc               ó    € V ^8„  d   QhRRRR/# )é   ÚkÚintÚreturnzTuple[int, int]© )Úformats   "ÚVC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\geometry\subpix\nms.pyÚ__annotate__r      s   € ÷ "ñ "�Sð "˜_ñ "ó    c                óD   € V ^,
          ^,          pWV,
          ^,
          3# )zPReturn the neighbour extents of a length-``k`` window either side of its centre.r   )r	   Úbefores   & r   Ú_split_windowr      s    € à�!�e˜�\€FØ�v•: •>Ð!Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚpartszList[torch.Tensor]r   útorch.Tensorr   )r   s   "r   r   r   #   s   € ÷ ñ Ð)ð ¨lñ r   c                óŠ   € V ^ ,          p\        ^\        V 4      4       F   p\        P                  ! WV,          4      pK"  	  V# )z;Reduce the maxima from the non-empty neighbourhood regions.)ÚrangeÚlenÚtorchÚmaximum)r   ÚoutÚis   &  r   Ú_reduce_maxr   #   s7   € à
��(€CÜ�1”c˜%“jÖ!ˆÜ�mŠm˜C q¥Ó*Šñ "à€Jr   c               ó    € V ^8„  d   QhRRRR/# )r   Úxr   r   Úboolr   )r   s   "r   r   r   +   s   € ÷ Bñ B ð B°ñ Br   c                óÒ   € \         P                  P                  4       '       d   R# V P                  ;'       d/    V P	                  4       ;'       d    V P
                  ^,          ^ 8„  # )a  Whether the ``(5, 5)`` and ``(7, 7)`` windows should take the pooled path instead of their comparison chains.

On CUDA the chains are launch-bound: 24 or 48 comparisons and their conjunction cost about 50 or 100 kernels,
against about 10 for :func:`_neighbourhood_max2d`, which is 2-6x faster there (RTX 4090, 480 x 640 to
960 x 1280 maps). On CPU the chains are 2-20x faster than the pooled path, so they stay there. MPS keeps them
too: before torch 2.16, its stride-1 ``max_pool2d`` drops nan and returns 0 for a window of -inf (pytorch#200910,
pytorch#200789), so the pooled path would change the mask there, although it is 1.4-1.9x (5 x 5) and 2.4-3.7x
(7 x 7) faster on an M1 with torch 2.14. Integer maps keep the chains everywhere, because CUDA ``max_pool2d`` takes
only floating-point input, and so do maps without channels, which ``max_pool2d`` rejects. TorchScript keeps them
too: the legacy ONNX exporter has no symbolic for the ``prim::is_cuda`` a scripted check would leave in the graph.
Both paths give the same mask.
F)r   ÚjitÚis_scriptingÚis_cudaÚis_floating_pointÚshape)r    s   &r   Ú_pooled_window_is_fasterr(   +   sI   € ô ‡y�y×Ñ×ÒÙØ�9‰9×AÐA˜×,Ñ,Ó.×AÐA°1·7±7¸1µ:À±>ÐAr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   r    r   Úkyr
   Úkxr   r   )r   s   "r   r   r   =   s(   € ÷ ñ ˜Lð ¨cð °sð ¸|ñ r   c           	     óH  € \        V4      w  r4\        V4      w  rVV P                  R,          V P                  R,          r‡. p	V^ 8”  g   V^ 8”  dª   \        P                  ! V ^V3^R7      p
V^ 8”  dD   V	P	                  \        P                  ! V
RRWt,
          ^,
          1R3,          V^3^R7      4       V^ 8”  d>   V	P	                  \        P                  ! V
RV^,           R1R3,          V^3^R7      4       V RW7V,
          1R3,          pV^ 8”  dC   V	P	                  \        P                  ! VRRW†,
          ^,
          13,          ^V3^R7      4       V^ 8”  d=   V	P	                  \        P                  ! VRV^,           R13,          ^V3^R7      4       \        V	4      # )aœ  Max over each ``ky x kx`` window with its own centre excluded.

The window minus its centre is partitioned into four rectangles -- the rows above the centre
row, the rows below it, and the centre row either side of the centre -- and each is reduced with
``max_pool2d``.  The two full-width slabs share a single ``(1, kx)`` column pass, so the cost is
``O(ky + kx)`` taps per position rather than the ``ky * kx - 1`` a literal neighbourhood costs.

Only positions whose full window lies inside the image are computed, so the result has shape
``(B, C, H - ky + 1, W - kx + 1)``; entry ``(i, j)`` belongs to the centre
``x[..., i + (k_y - 1) // 2, j + (k_x - 1) // 2]``.
©Ústride.NºNNNéþÿÿÿéÿÿÿÿ)r   r'   ÚFÚ
max_pool2dÚappendr   )r    r*   r+   ÚcyÚbyÚcxÚbxÚHÚWr   Úrow_maxÚ
centre_rows   &&&         r   Ú_neighbourhood_max2dr=   =   s[  € ô ˜2Ó�F€BÜ˜2Ó�F€BØ�7‰7�2�;˜Ÿ™ �€qØ "€EØ	ˆA„v��a”Ü—,’,˜q 1 b '°!Ô4ˆØ�Œ6Ø�L‰LœŸš g¨c°<°QµV¸aµZ°<ÀÐ.BÕ&CÀbÈ!ÀWÐUVÔWÔXØ�Œ6Ø�L‰LœŸš g¨c°2¸µ6±8¸QÐ.>Õ&?À"ÀaÀÐQRÔSÔTØ�3˜ �V˜ QÐ&Õ'€JØ	ˆA„vØ�‰”Q—\’\ *¨S°,°AµF¸QµJ°,Ð->Õ"?À!ÀRÀÐQRÔSÔTØ	ˆA„vØ�‰”Q—\’\ *¨S°"°qµ&±(¨]Õ";¸aÀ¸WÈQÔOÔPÜ�uÓÐr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )r   r    r   Úkdr
   r*   r+   r   r   )r   s   "r   r   r   [   s/   € ÷ ñ ˜Lð ¨cð °sð Àð Èñ r   c           	     óf  € \        V4      w  rE\        V4      w  rg\        V4      w  r‰V P                  R,          V P                  R,          V P                  R,          rËp
. pV^ 8”  g   V^ 8”  g   V^ 8”  g   V^ 8”  d   \        P                  ! V ^^V3^R7      MT pV^ 8”  g   V^ 8”  d¯   \        P                  ! V^V^3^R7      pV^ 8”  dF   VP	                  \        P                  ! VRRW¥,
          ^,
          1RR3,          V^^3^R7      4       V^ 8”  d@   VP	                  \        P                  ! VRV^,           R1RR3,          V^^3^R7      4       VRWJV,
          1RR3,          pV^ 8”  dE   VP	                  \        P                  ! VRRW·,
          ^,
          1R3,          ^V^3^R7      4       V^ 8”  d?   VP	                  \        P                  ! VRV^,           R1R3,          ^V^3^R7      4       V RWJV,
          1WkV,
          1R3,          pV^ 8”  dD   VP	                  \        P                  ! VRRWÉ,
          ^,
          13,          ^^V3^R7      4       V	^ 8”  d>   VP	                  \        P                  ! VRV^,           R13,          ^^V	3^R7      4       \        V4      # )aY  Max over each ``kd x ky x kx`` window with its own centre excluded.

The 3-D analogue of :func:`_neighbourhood_max2d`: six boxes -- the depth slabs either side of
the centre depth, then the row slabs either side of the centre row within it, then the centre
row either side of the centre -- sharing the column and row passes they have in common.
r-   .Nr/   éýÿÿÿr0   r1   )r   r'   r2   Ú
max_pool3dr4   r   )r    r?   r*   r+   ÚcdÚbdr5   r6   r7   r8   ÚDr9   r:   r   Úcol_maxÚ	plane_maxÚcentre_planer<   s   &&&&              r   Ú_neighbourhood_max3drI   [   sQ  € ô ˜2Ó�F€BÜ˜2Ó�F€BÜ˜2Ó�F€BØ�g‰g�b�k˜1Ÿ7™7 2�;¨¯©°­ˆ!€AØ "€EØ8:¸Q¼À"ÀqÄ&ÈBÐQRÌFÐVXÐ[\ÔV\Œa�lŠl˜1˜q ! R˜j°Õ3Ðcd€GØ	ˆA„v��a”Ü—L’L ¨1¨b°!¨*¸QÔ?ˆ	Ø�Œ6Ø�L‰LœŸš i°°\°qµvÀµz°\À1ÀaÐ0GÕ&HÈ2ÈqÐRSÈ*Ð]^Ô_Ô`Ø�Œ6Ø�L‰LœŸš i°°R¸!µV±X¸qÀ!Ð0CÕ&DÀrÈ1ÈaÀjÐYZÔ[Ô\Ø˜3 ¨¥V ¨Q°Ð1Õ2€LØ	ˆA„vØ�‰”Q—\’\ ,¨s°L°aµf¸qµj°LÀ!Ð/CÕ"DÀqÈ"ÈaÀjÐYZÔ[Ô\Ø	ˆA„vØ�‰”Q—\’\ ,¨s°B¸µF±H¸aÐ/?Õ"@À1ÀbÈ!À*ÐUVÔWÔXØ�3˜ �V˜ R¨b­& [°!Ð3Õ4€JØ	ˆA„vØ�‰”Q—\’\ *¨S°,°AµF¸QµJ°,Ð->Õ"?À!ÀQÈÀÐTUÔVÔWØ	ˆA„vØ�‰”Q—\’\ *¨S°"°qµ&±(¨]Õ";¸aÀÀB¸ZÐPQÔRÔSÜ�uÓÐr   c                  óT   a € ] tR t^{tRtR V 3R lltR V 3R lltR	R R lltRtV ;t	# )
ÚNonMaximaSuppression2da“  Keep the strict local maxima of a (B, C, H, W) map; the module form of nms2d.

``nms = NonMaximaSuppression2d((ky, kx))`` stores the window size, and ``out = nms(response)`` returns what
``nms2d(response, (ky, kx))`` returns: the ``(B, C, H, W)`` map with every position that is not a strict local
maximum set to ``0``, or with ``nms(response, mask_only=True)`` the boolean mask. The module holds no parameters
or buffers; a state dict saved by an older kornia release with a ``kernel`` buffer still loads strictly.

Convention:
    - See the convention block of :func:`~kornia.geometry.subpix.nms2d`.

.. warning::
    On MPS, torch earlier than 2.16 gives wrong masks for some windows when the input holds nan or -inf; see the
    warning of :func:`~kornia.geometry.subpix.nms2d`.

Args:
    kernel_size: the window size ``(ky, kx)``, a tuple of two ints; a list or another length raises
      ``AssertionError``.

See Also:
    - :func:`nms2d`: the function form, with the window size passed on each call.
    - :class:`NonMaximaSuppression3d`: the module for ``(B, C, D, H, W)`` volumes.
    - :func:`nms3d_minmax`: strict maxima and minima of a volume in one call.

c               ó    € V ^8„  d   QhRRRR/# )r   Úkernel_sizeútuple[int, int]r   ÚNoner   )r   s   "r   r   Ú#NonMaximaSuppression2d.__annotate__•   s   € ÷ 8ñ 8 Oð 8¸ñ 8r   c                	óº   <€ \         SV `  4        \        V\        4      '       g   \	        \        V4      4      h\        V4      ^8w  d   \	        V4      hWn        R# )r   N©ÚsuperÚ__init__Ú
isinstanceÚtupleÚAssertionErrorÚtyper   rM   ©ÚselfrM   Ú	__class__s   &&€r   rT   ÚNonMaximaSuppression2d.__init__•   sI   ø€ Ü‰ÑÔÜ˜+¤u×-Ò-Ü ¤ kÓ!2Ó3Ð3Üˆ{Ó˜qÔ Ü  Ó-Ð-Ø,7Ör   c               ó8   € V ^8„  d   QhRRRRRRRRR	R
RR
RR
RR/# )r   Ú
state_dictzdict[str, torch.Tensor]ÚprefixÚstrÚlocal_metadatazdict[str, Any]Ústrictr!   Úmissing_keysz	list[str]Úunexpected_keysÚ
error_msgsr   rO   r   )r   s   "r   r   rP   �   sZ   € ÷ 
ñ 
à+ð
ð ð
ð 'ð	
ð
 ð
ð  ð
ð #ð
ð ð
ð 
ñ
r   c           	     	ó^   <€ VP                  VR ,           R4       \        SV `	  WW4WVV4       R# )ÚkernelN)ÚpoprS   Ú_load_from_state_dict)	rZ   r^   r_   ra   rb   rc   rd   re   r[   s	   &&&&&&&&€r   ri   Ú,NonMaximaSuppression2d._load_from_state_dict�   s/   ø€ ð 	�‰�v Õ(¨$Ô/Ü‰Ñ%Ø ¸ÐWaö	
r   c               ó$   € V ^8„  d   QhRRRRRR/# ©r   r    r   Ú	mask_onlyr!   r   r   )r   s   "r   r   rP   ¯   s&   € ÷ ['ñ ['˜ð ['°$ð ['À<ñ ['r   c           	     óø  € \        VP                  4      ^8w  d   \        VP                  4      hVP                  4       w  r4rVV P                  R8X  d5   \
        P                  ! W4WVVP                  \
        P                  R7      pEMSV P                  R8X  dù   \        ^ R4      p\        ^R4      p	\        ^R4      p
\
        P                  ! W4WVVP                  \
        P                  R7      pVRW™3,          pW±RWˆ3,          8„  W±RW‰3,          8„  ,          W±RWŠ3,          8„  ,          W±RW˜3,          8„  ,          W±RWš3,          8„  ,          W±RW¨3,          8„  ,          W±RW©3,          8„  ,          W±RWª3,          8„  ,          VR^R1^R13&   EMJV P                  R8X  EdL   \        V4      '       Eg:   \        ^ R	4      p\        ^R
4      p\        ^R4      p\        ^R4      p\        ^R4      p\
        P                  ! W4WVVP                  \
        P                  R7      pVRWî3,          pW±RWÌ3,          8„  W±RWÍ3,          8„  ,          W±RWÎ3,          8„  ,          W±RWÏ3,          8„  ,          W±RVV3,          8„  ,          W±RWÜ3,          8„  ,          W±RWÝ3,          8„  ,          W±RWÞ3,          8„  ,          W±RWß3,          8„  ,          W±RVV3,          8„  ,          W±RWì3,          8„  ,          W±RWí3,          8„  ,          W±RWï3,          8„  ,          W±RVV3,          8„  ,          W±RWü3,          8„  ,          W±RWý3,          8„  ,          W±RWþ3,          8„  ,          W±RWÿ3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          VR^R1^R13&   EMíV P                  R8X  Ed+   \        V4      '       Eg   \        ^ R4      p\        ^R4      p\        ^R	4      p\        ^R
4      p\        ^R4      p\        ^R4      p\        ^R4      p\
        P                  ! W4WVVP                  \
        P                  R7      pVRWî3,          pW±RVV3,          8„  W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RWÌ3,          8„  ,          W±RWÍ3,          8„  ,          W±RWÎ3,          8„  ,          W±RWÏ3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RWÜ3,          8„  ,          W±RWÝ3,          8„  ,          W±RWÞ3,          8„  ,          W±RWß3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RWì3,          8„  ,          W±RWí3,          8„  ,          W±RWï3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RWü3,          8„  ,          W±RWý3,          8„  ,          W±RWþ3,          8„  ,          W±RWÿ3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          W±RVV3,          8„  ,          VR^R
1^R
13&   M±V P                  w  pp\        V4      w  pp\        V4      w  pp\
        P                  ! W4WVVP                  \
        P                  R7      pVV8¼  dN   VV8¼  dG   VRVVV,
          1VVV,
          13,          pV\        VVV4      8„  VRVVV,
          1VVV,
          13&   V'       d   V# \
        P                  ! Wq^ 4      # )aQ  Keep only strict local maxima in a 2D response map.

Each spatial location is compared with the surrounding values inside
``self.kernel_size``. Locations that are not strictly larger than their
neighbors are suppressed. This is commonly used to turn dense corner or
keypoint response maps into sparse candidate locations.

Args:
    x: Response tensor with shape ``(B, C, H, W)``, where
        :math:`B` is the batch size, :math:`C` is the number of
        response channels, :math:`H` is height, and :math:`W` is width.
    mask_only: If ``True``, return the boolean maxima mask. If
        ``False``, return ``x`` masked by local-maxima positions.

Returns:
    If ``mask_only`` is ``True``, a boolean tensor with shape
    ``(B, C, H, W)``. Otherwise, a tensor with the same shape and
    dtype as ``x`` where non-maxima have been set to zero.
©ÚdeviceÚdtypeN.)é   rr   )é   rs   r0   r1   )é   rt   éüÿÿÿrA   )é   rv   iúÿÿÿéûÿÿÿ)r   r'   rW   ÚsizerM   r   Úonesrp   r!   ÚsliceÚzerosr(   r   r=   Úwhere)rZ   r    rm   ÚBÚCHr9   r:   ÚmaskÚleftÚcenterÚrightÚctÚc2Úc1Úc0Úp1Úp2Úc3Úp3r*   r+   r5   r6   r7   r8   Úcentres   &&&                       r   ÚforwardÚNonMaximaSuppression2d.forward¯   sÀ	  € ô( ˆq�w‰w‹<˜1ÔÜ  §¡Ó)Ð)Ø—f‘f“h‰ˆˆqà×Ñ˜vÔ%Ü—:’:˜a Q°!·(±(Ä%Ç*Á*ÔMŠDØ×Ñ Ô'ä˜˜B“<ˆDÜ˜1˜b“\ˆFÜ˜!˜T“NˆEÜ—;’;˜q a°1·8±8Ä5Ç:Á:ÔNˆDØ�3˜Ð&Õ'ˆBà˜˜T˜Õ(Ñ(Ø˜#˜tÐ+Õ,Ñ,õ.à˜#˜tÐ*Õ+Ñ+õ-ð ˜#˜vÐ+Õ,Ñ,õ.ð ˜#˜vÐ,Õ-Ñ-õ	/ð
 ˜#˜uÐ*Õ+Ñ+õ-ð ˜#˜uÐ,Õ-Ñ-õ/ð ˜#˜uÐ+Õ,Ñ,õ.ð ��a˜�d˜A˜b˜D�Ó!ð ×Ñ Õ'Ô0HÈ×0KÓ0Kä�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜$“ˆBÜ—;’;˜q a°1·8±8Ä5Ç:Á:ÔNˆDØ�3˜�;•ˆBà˜˜R˜•nÑ$Ø˜#˜r˜+�Ñ&õ(à˜#˜r˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ	(ð
 ˜#˜r˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ	(ð ˜#˜r˜+�Ñ&õ
(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð  ˜#˜r˜+�Ñ&õ!(ð" ˜#˜r˜+�Ñ&õ#(ð$ ˜#˜r 2˜+�Ñ&õ%(ð& ˜#˜r 2˜+�Ñ&õ'(ð( ˜#˜r 2˜+�Ñ&õ)(ð* ˜#˜r 2˜+�Ñ&õ+(ð, ˜#˜r 2˜+�Ñ&õ-(ð. ˜#˜r 2˜+�Ñ&õ/(ð ��a˜�d˜A˜b˜D�Ó!ð4 ×Ñ Õ'Ô0HÈ×0KÓ0Kä�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜"“ˆBÜ�q˜$“ˆBÜ—;’;˜q a°1·8±8Ä5Ç:Á:ÔNˆDØ�3˜�;•ˆBà˜˜R ˜•nÑ$Ø˜#˜r 2˜+�Ñ&õ(à˜#˜r 2˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ	(ð
 ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ	(ð ˜#˜r˜+�Ñ&õ
(ð ˜#˜r˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r 2˜+�Ñ&õ(ð ˜#˜r˜+�Ñ&õ(ð  ˜#˜r˜+�Ñ&õ!(ð" ˜#˜r˜+�Ñ&õ#(ð$ ˜#˜r˜+�Ñ&õ%(ð& ˜#˜r 2˜+�Ñ&õ'(ð( ˜#˜r 2˜+�Ñ&õ)(ð* ˜#˜r 2˜+�Ñ&õ+(ð, ˜#˜r˜+�Ñ&õ-(ð. ˜#˜r˜+�Ñ&õ/(ð0 ˜#˜r˜+�Ñ&õ1(ð2 ˜#˜r 2˜+�Ñ&õ3(ð4 ˜#˜r 2˜+�Ñ&õ5(ð6 ˜#˜r 2˜+�Ñ&õ7(ð8 ˜#˜r˜+�Ñ&õ9(ð: ˜#˜r˜+�Ñ&õ;(ð< ˜#˜r˜+�Ñ&õ=(ð> ˜#˜r˜+�Ñ&õ?(ð@ ˜#˜r 2˜+�Ñ&õA (ðB ˜#˜r 2˜+�Ñ&õC!(ðD ˜#˜r 2˜+�Ñ&õE"(ðF ˜#˜r 2˜+�Ñ&õG#(ðH ˜#˜r 2˜+�Ñ&õI$(ðJ ˜#˜r 2˜+�Ñ&õK%(ðL ˜#˜r 2˜+�Ñ&õM&(ðN ˜#˜r 2˜+�Ñ&õO'(ðP ˜#˜r 2˜+�Ñ&õQ((ðR ˜#˜r 2˜+�Ñ&õS)(ðT ˜#˜r 2˜+�Ñ&õU*(ðV ˜#˜r 2˜+�Ñ&õW+(ðX ˜#˜r 2˜+�Ñ&õY,(ðZ ˜#˜r 2˜+�Ñ&õ[-(ð\ ˜#˜r 2˜+�Ñ&õ].(ð^ ˜#˜r 2˜+�Ñ&õ_/(ð ��a˜�d˜A˜b˜D�Ò!ðp ×%Ñ%‰FˆB�Ü" 2Ó&‰FˆB�Ü" 2Ó&‰FˆB�Ü—;’;˜q a°1·8±8Ä5Ç:Á:ÔNˆDØ�BŒw˜1 œ7Ø˜3  Q¨¥V ¨R°!°bµ&¨[Ð8Õ9�Ø6<Ô?SÐTUÐWYÐ[]Ó?^Ñ6^��S˜"˜q 2�v˜+ r¨A°­F {Ð2Ñ3çØˆKÜ�{Š{˜4 AÓ&Ð&r   ©rM   ©F)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rT   ri   rŒ   Ú__static_attributes__Ú__classcell__©r[   s   @r   rK   rK   {   s(   ø† ñ÷28ð 8÷
ð 
÷$['õ ['r   rK   c                  óB   a € ] tR tRtRtR V 3R lltRR R lltRtV ;t# )	ÚNonMaximaSuppression3diM  a  Keep the strict local maxima of a (B, C, D, H, W) volume; the module form of nms3d.

``nms = NonMaximaSuppression3d((kd, ky, kx))`` stores the window size, and ``out = nms(volume)`` returns what
``nms3d(volume, (kd, ky, kx))`` returns: the ``(B, C, D, H, W)`` volume with every voxel that is not a strict
local maximum set to ``0``, or with ``nms(volume, mask_only=True)`` the boolean mask.

Convention:
    - See the convention block of :func:`~kornia.geometry.subpix.nms2d`.

.. warning::
    On MPS, torch earlier than 2.16 gives wrong masks for some windows when the input holds nan; see the warning
    of :func:`~kornia.geometry.subpix.nms3d`.

Args:
    kernel_size: the window size ``(kd, ky, kx)``, a tuple of three ints; a list or another length raises
      ``AssertionError``.

See Also:
    - :func:`nms3d`: the function form, with the window size passed on each call.
    - :class:`NonMaximaSuppression2d`: the module for ``(B, C, H, W)`` maps.
    - :func:`nms3d_minmax`: strict maxima and minima in a ``3 x 3 x 3`` window in one call.

c               ó    € V ^8„  d   QhRRRR/# )r   rM   útuple[int, int, int]r   rO   r   )r   s   "r   r   Ú#NonMaximaSuppression3d.__annotate__f  s   € ÷ =ñ =Ð$8ð =¸Tñ =r   c                	óº   <€ \         SV `  4        \        V\        4      '       g   \	        \        V4      4      h\        V4      ^8w  d   \	        V4      hWn        R# )rs   NrR   rY   s   &&€r   rT   ÚNonMaximaSuppression3d.__init__f  sI   ø€ Ü‰ÑÔÜ˜+¤u×-Ò-Ü ¤ kÓ!2Ó3Ð3Üˆ{Ó˜qÔ Ü  Ó-Ð-Ø1<Ör   c               ó$   € V ^8„  d   QhRRRRRR/# rl   r   )r   s   "r   r   rœ   n  s&   € ÷ K'ñ K'˜ð K'°$ð K'À<ñ K'r   c           
     óŠ  € \        VP                  4      ^8w  d   \        VP                  4      hVP                  4       w  r4rVpV P                  R8X  d5   \
        P                  ! W4WVWqP                  \
        P                  R7      pEM›V P                  R8X  Ed¹   \
        P                  ! W4WVWqP                  \
        P                  R7      pVR^R1^R1^R13,          p	W‘R^ R1^ R1^ R13,          8„  W‘R^ R1^ R1^R13,          8„  ,          W‘R^ R1^ R1R3,          8„  ,          W‘R^ R1^R1^ R13,          8„  ,          W‘R^ R1^R1^R13,          8„  ,          W‘R^ R1^R1R3,          8„  ,          W‘R^ R1R^ R13,          8„  ,          W‘R^ R1R^R13,          8„  ,          W‘R^ R1RR3,          8„  ,          W‘R^R1^ R1^ R13,          8„  ,          W‘R^R1^ R1^R13,          8„  ,          W‘R^R1^ R1R3,          8„  ,          W‘R^R1^R1^ R13,          8„  ,          W‘R^R1^R1R3,          8„  ,          W‘R^R1R^ R13,          8„  ,          W‘R^R1R^R13,          8„  ,          W‘R^R1RR3,          8„  ,          W‘RR^ R1^ R13,          8„  ,          W‘RR^ R1^R13,          8„  ,          W‘RR^ R1R3,          8„  ,          W‘RR^R1^ R13,          8„  ,          W‘RR^R1^R13,          8„  ,          W‘RR^R1R3,          8„  ,          W‘RRR^ R13,          8„  ,          W‘RRR^R13,          8„  ,          W‘R,          8„  ,          VR^R1^R1^R13&   MÑV P                  w  r«p\        V
4      w  rÞ\        V4      w  pp\        V4      w  pp\
        P                  ! W4WVWqP                  \
        P                  R7      pWZ8¼  db   Wk8¼  d\   W|8¼  dV   VRWÕV,
          1WöV,
          1VVV,
          13,          pV\        WW¼4      8„  VRWÕV,
          1WöV,
          1VVV,
          13&   V'       d   V# \
        P                  ! W�^ 4      # )	aû  Keep only strict local maxima in a 3D response volume.

Each voxel is compared with its neighbors across depth, height, and
width. This is used by scale-space detectors to keep responses that are
locally maximal both in image position and in scale/depth.

Args:
    x: Response tensor with shape ``(B, C, D, H, W)``, where
        :math:`B` is batch size, :math:`C` is channel count,
        :math:`D` is depth or scale level, :math:`H` is height, and
        :math:`W` is width.
    mask_only: If ``True``, return only the maxima mask; otherwise
        return suppressed responses.

Returns:
    Boolean maxima mask with shape ``(B, C, D, H, W)`` when
    ``mask_only`` is ``True``. Otherwise, an NMS-filtered tensor with
    the same shape and dtype as ``x``.
ro   .ºr   NN)rr   rr   rr   )rs   rs   rs   r1   r0   ©.r¡   r¡   r¡   )r   r'   rW   rx   rM   r   ry   rp   r!   r{   r   rI   r|   )rZ   r    rm   r}   r~   rE   r9   r:   r   rƒ   r?   r*   r+   rC   rD   r5   r6   r7   r8   r‹   s   &&&                 r   rŒ   ÚNonMaximaSuppression3d.forwardn  s  € ô( ˆq�w‰w‹<˜1ÔÜ  §¡Ó)Ð)àŸ™›‰ˆˆq�QØ×Ñ˜yÔ(Ü—:’:˜a Q¨1·X±XÄUÇZÁZÔPŠDØ×Ñ Õ*ô —;’;˜q a¨A·h±hÄeÇjÁjÔQˆDØ�3˜˜"˜˜a ˜d A b DÐ(Õ)ˆBà˜˜Q˜r˜T 1 R 4¨¨2¨Ð-Õ.Ñ.Ø˜#˜q ˜t Q r T¨1¨R¨4Ð/Õ0Ñ0õ2à˜#˜q ˜t Q r T¨2Ð-Õ.Ñ.õ0ð ˜#˜q ˜t Q r T¨1¨R¨4Ð/Õ0Ñ0õ2ð ˜#˜q ˜t Q r T¨1¨R¨4Ð/Õ0Ñ0õ	2ð
 ˜#˜q ˜t Q r T¨2Ð-Õ.Ñ.õ0ð ˜#˜q ˜t R¨¨2¨Ð-Õ.Ñ.õ0ð ˜#˜q ˜t R¨¨2¨Ð-Õ.Ñ.õ0ð ˜#˜q ˜t R¨Ð+Õ,Ñ,õ.ð ˜#˜q ˜t Q r T¨1¨R¨4Ð/Õ0Ñ0õ	2ð ˜#˜q ˜t Q r T¨1¨R¨4Ð/Õ0Ñ0õ
2ð ˜#˜q ˜t Q r T¨2Ð-Õ.Ñ.õ0ð ˜#˜q ˜t Q r T¨1¨R¨4Ð/Õ0Ñ0õ2ð ˜#˜q ˜t Q r T¨2Ð-Õ.Ñ.õ0ð ˜#˜q ˜t R¨¨2¨Ð-Õ.Ñ.õ0ð ˜#˜q ˜t R¨¨2¨Ð-Õ.Ñ.õ0ð  ˜#˜q ˜t R¨Ð+Õ,Ñ,õ!.ð" ˜#˜r 1 R 4¨¨2¨Ð-Õ.Ñ.õ#0ð$ ˜#˜r 1 R 4¨¨2¨Ð-Õ.Ñ.õ%0ð& ˜#˜r 1 R 4¨Ð+Õ,Ñ,õ'.ð( ˜#˜r 1 R 4¨¨2¨Ð-Õ.Ñ.õ)0ð* ˜#˜r 1 R 4¨¨2¨Ð-Õ.Ñ.õ+0ð, ˜#˜r 1 R 4¨Ð+Õ,Ñ,õ-.ð. ˜#˜r 2 q¨ tÐ+Õ,Ñ,õ/.ð0 ˜#˜r 2 q¨ tÐ+Õ,Ñ,õ1.ð2 ˜/Õ*Ñ*õ3,ð ��a˜�d˜A˜b˜D ! B $Ð&Ò'ðB ×)Ñ)‰JˆB�BÜ" 2Ó&‰FˆBÜ" 2Ó&‰FˆB�Ü" 2Ó&‰FˆB�Ü—;’;˜q a¨A·h±hÄeÇjÁjÔQˆDØŒw˜1œ7 q¤wØ˜3 ¨¥V ¨R°bµ&¨[¸"¸qÀ2½v¸+ÐEÕF�ØCIÔL`ÐabÐhjÓLoÑCo��S˜" 2�v˜+ r°­F {°B¸¸R½°KÐ?Ñ@ßØˆKÜ�{Š{˜4 AÓ&Ð&r   rŽ   r�   )	r�   r‘   r’   r“   r”   rT   rŒ   r•   r–   r—   s   @r   r™   r™   M  s   ø† ñ÷0=ð =÷K'õ K'r   r™   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úinputr   rM   rN   rm   r!   r   r   )r   s   "r   r   r   ¿  s/   € ÷ .Añ .A�ð .A¨Oð .AÈð .AÐYeñ .Ar   c                ó$   € \        V4      ! W4      # )aŒ  Keep the strict local maxima of a (B, C, H, W) map in a 2D window, zeroing the rest.

``out = nms2d(response, (ky, kx))`` takes a ``(B, C, H, W)`` response map and returns it with every position that
is not a strict local maximum of its ``ky x kx`` window set to ``0``, ``(B, C, H, W)`` in the input dtype; with
``mask_only=True`` it returns the boolean maxima mask instead. Each channel is suppressed on its own. For
``(B, C, D, H, W)`` volumes, use :func:`nms3d`, or :func:`nms3d_minmax` for the maxima and minima together; to
suppress overlapping boxes by their IoU, use :func:`~kornia.geometry.bbox.nms`.

Convention:
    - Only strict maxima survive: a position must be greater than every other value in its ``kernel_size``
      window, so with ``k >= 3`` on every axis every pixel of a plateau is suppressed, even a plateau at the top
      of the map. :ref:`Coordinates and sizes <coordinate-conventions>` compares this with scikit-image, scipy
      and OpenCV.
    - The window spans ``(k - 1) // 2`` positions before the centre and ``k // 2`` after it on each axis, so an
      even ``k`` reaches one further forward, and the first ``(k - 1) // 2`` and last ``k // 2`` positions of
      each axis are never maxima.
    - The default output keeps the input value at each maximum and is ``0`` elsewhere, which is larger than a
      negative maximum, so use ``mask_only=True`` for a signed response.

.. warning::
    On MPS, torch earlier than 2.16 gives wrong masks for a ``kernel_size`` other than ``(1, 1)``, ``(3, 3)``,
    ``(5, 5)`` and ``(7, 7)`` when the map holds nan or -inf: its stride-1 ``max_pool2d`` drops nan and returns
    ``0`` for a window of -inf
    (`pytorch/pytorch#200910 <https://github.com/pytorch/pytorch/issues/200910>`__,
    `pytorch/pytorch#200789 <https://github.com/pytorch/pytorch/issues/200789>`__). A position next to a nan can
    then be kept, and a negative maximum among -inf neighbours suppressed. Those four windows compare the
    neighbours directly and are not affected, and neither are other devices or torch 2.16 or later.

Args:
    input: response map with shape ``(B, C, H, W)``; another number of dimensions raises ``AssertionError``.
    kernel_size: the window size ``(ky, kx)``, a tuple of two ints. ``(1, 1)`` keeps every position, and a
      window larger than the map keeps none.
    mask_only: return the boolean maxima mask instead of the suppressed map.

Returns:
    the suppressed map ``(B, C, H, W)`` in the dtype of ``input``, or with ``mask_only=True`` a boolean mask of
    the same shape.

See Also:
    - :func:`nms3d`: the same rule over the depth, height and width of a ``(B, C, D, H, W)`` volume.
    - :func:`nms3d_minmax`: strict maxima and minima of a volume in a fixed ``3 x 3 x 3`` window, in one call.
    - :class:`NonMaximaSuppression2d`: the module form.
    - :func:`~kornia.geometry.bbox.nms`: suppresses overlapping boxes by their IoU, not positions of a map.

)rK   ©r¥   rM   rm   s   &&&r   Únms2dr¨   ¿  s   € ô\ " +Ô.¨uÓ@Ð@r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   r¥   r   rM   r›   rm   r!   r   r   )r   s   "r   r   r   ð  s0   € ÷ %Añ %A�ð %AÐ,@ð %AÈTð %AÐ^jñ %Ar   c                ó$   € \        V4      ! W4      # )a  Keep the strict local maxima of a (B, C, D, H, W) volume in a 3D window, zeroing the rest.

``out = nms3d(volume, (kd, ky, kx))`` takes a ``(B, C, D, H, W)`` volume, such as a scale-space response with the
scale levels along ``D``, and returns it with every voxel that is not a strict local maximum of its
``kd x ky x kx`` window set to ``0``; with ``mask_only=True`` it returns the boolean maxima mask instead. For the
minima as well, in a ``3 x 3 x 3`` window, use :func:`nms3d_minmax`; for a ``(B, C, H, W)`` map, :func:`nms2d`.

Convention:
    - See the convention block of :func:`nms2d`, applied over depth, height and width.

.. warning::
    On MPS, torch earlier than 2.16 gives wrong masks for a ``kernel_size`` other than ``(1, 1, 1)`` and
    ``(3, 3, 3)`` when the volume holds nan: its ``max_pool3d`` drops a nan that is not the first value of its
    window (`pytorch/pytorch#200910 <https://github.com/pytorch/pytorch/issues/200910>`__), so a position next to
    a nan can be kept. Those two windows compare the neighbours directly and are not affected, and neither are
    other devices or torch 2.16 or later.

Args:
    input: response volume with shape ``(B, C, D, H, W)``; another number of dimensions raises
      ``AssertionError``.
    kernel_size: the window size ``(kd, ky, kx)``, a tuple of three ints. ``(1, 1, 1)`` keeps every voxel, and a
      window larger than the volume keeps none.
    mask_only: return the boolean maxima mask instead of the suppressed volume.

Returns:
    the suppressed volume ``(B, C, D, H, W)`` in the dtype of ``input``, or with ``mask_only=True`` a boolean
    mask of the same shape.

See Also:
    - :func:`nms2d`: the same rule over the height and width of a ``(B, C, H, W)`` map.
    - :func:`nms3d_minmax`: the maxima and the minima in a fixed ``3 x 3 x 3`` window, in one call.
    - :class:`NonMaximaSuppression3d`: the module form.
    - :func:`iterative_quad_interp3d`: refines the maxima of a scale-space volume to sub-voxel positions; it
      takes this function's mask as ``precomputed_nms_mask``.

)r™   r§   s   &&&r   Únms3dr«   ð  s   € ôJ " +Ô.¨uÓ@Ð@r   c               ó    € V ^8„  d   QhRRRR/# )r   r¥   r   r   z!tuple[torch.Tensor, torch.Tensor]r   )r   s   "r   r   r     s   € ÷ gñ g˜ð gÐ)Jñ gr   c           
     ó6  € V P                  4       ^8w  d   \        V P                  4      hV P                  w  rr4p\        P                  ! WW4WPP
                  \        P                  R7      p\        P                  ! WW4WPP
                  \        P                  R7      pV R^R1^R1^R13,          pW€R^ R1^ R1^ R13,          8„  W€R^ R1^ R1^R13,          8„  ,          W€R^ R1^ R1R3,          8„  ,          W€R^ R1^R1^ R13,          8„  ,          W€R^ R1^R1^R13,          8„  ,          W€R^ R1^R1R3,          8„  ,          W€R^ R1R^ R13,          8„  ,          W€R^ R1R^R13,          8„  ,          W€R^ R1RR3,          8„  ,          W€R^R1^ R1^ R13,          8„  ,          W€R^R1^ R1^R13,          8„  ,          W€R^R1^ R1R3,          8„  ,          W€R^R1^R1^ R13,          8„  ,          W€R^R1^R1R3,          8„  ,          W€R^R1R^ R13,          8„  ,          W€R^R1R^R13,          8„  ,          W€R^R1RR3,          8„  ,          W€RR^ R1^ R13,          8„  ,          W€RR^ R1^R13,          8„  ,          W€RR^ R1R3,          8„  ,          W€RR^R1^ R13,          8„  ,          W€RR^R1^R13,          8„  ,          W€RR^R1R3,          8„  ,          W€RRR^ R13,          8„  ,          W€RRR^R13,          8„  ,          W€R,          8„  ,          p	W€R^ R1^ R1^ R13,          8  W€R^ R1^ R1^R13,          8  ,          W€R^ R1^ R1R3,          8  ,          W€R^ R1^R1^ R13,          8  ,          W€R^ R1^R1^R13,          8  ,          W€R^ R1^R1R3,          8  ,          W€R^ R1R^ R13,          8  ,          W€R^ R1R^R13,          8  ,          W€R^ R1RR3,          8  ,          W€R^R1^ R1^ R13,          8  ,          W€R^R1^ R1^R13,          8  ,          W€R^R1^ R1R3,          8  ,          W€R^R1^R1^ R13,          8  ,          W€R^R1^R1R3,          8  ,          W€R^R1R^ R13,          8  ,          W€R^R1R^R13,          8  ,          W€R^R1RR3,          8  ,          W€RR^ R1^ R13,          8  ,          W€RR^ R1^R13,          8  ,          W€RR^ R1R3,          8  ,          W€RR^R1^ R13,          8  ,          W€RR^R1^R13,          8  ,          W€RR^R1R3,          8  ,          W€RRR^ R13,          8  ,          W€RRR^R13,          8  ,          W€R,          8  ,          p
W–R^R1^R1^R13&   W§R^R1^R1^R13&   Wg3# )a  Mask the strict local maxima and minima of a (B, C, D, H, W) volume in a 3x3x3 window.

``max_mask, min_mask = nms3d_minmax(volume)`` takes a ``(B, C, D, H, W)`` volume and returns two boolean masks of
the same shape: the voxels strictly greater than all 26 neighbours, and those strictly smaller. For a floating
input they equal ``nms3d(volume, (3, 3, 3), mask_only=True)`` and
``nms3d(-volume, (3, 3, 3), mask_only=True)``. :class:`~kornia.feature.ScaleSpaceDetector` uses it on every
octave; for another window size, call :func:`nms3d`.

Under ``torch.compile`` the comparisons can fuse; in eager mode on the CPU and MPS the call costs about as much as
the two :func:`nms3d` calls.

Convention:
    - The strict and border rules of :func:`nms2d` with a :math:`3 \times 3 \times 3` window, for maxima and
      minima alike.

Args:
    input: 5-D tensor of shape ``(B, C, D, H, W)``; another number of dimensions raises ``AssertionError``.

Returns:
    A pair ``(max_mask, min_mask)`` of bool tensors with the same shape as
    *input*.  ``max_mask[..., d, h, w]`` is ``True`` when the voxel is
    strictly greater than all 26 neighbours; ``min_mask`` is the same for
    strict local minima.

See Also:
    - :func:`nms3d`: the maxima only, in a window of any size.
    - :func:`nms2d`: the maxima of a ``(B, C, H, W)`` map.
    - :class:`NonMaximaSuppression3d`: the maxima only, as a module.

Example:
    >>> x = torch.randn(1, 1, 5, 10, 10)
    >>> max_mask, min_mask = nms3d_minmax(x)
    >>> max_mask.shape
    torch.Size([1, 1, 5, 10, 10])

ro   .r¡   r1   r0   r¢   )ÚdimrW   r'   r   r{   rp   r!   )r¥   r}   r~   rE   r9   r:   Úmax_maskÚmin_maskrƒ   Úis_maxÚis_mins   &          r   Únms3d_minmaxr³     sÇ  € ðJ ‡y�yƒ{�aÔÜ˜UŸ[™[Ó)Ð)Ø—[‘[�N€Aˆ1�Ü�{Š{˜1 !¨·,±,ÄeÇjÁjÔQ€HÜ�{Š{˜1 !¨·,±,ÄeÇjÁjÔQ€HØ	ˆs�A�b�D˜!˜B˜$  " Ð$Õ	%€Bð 
�C˜˜2˜˜q ˜t Q r TÐ)Õ*Ñ	*Ø�c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ	.à�c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ	.ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ		.ð
 �c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  RÐ'Õ(Ñ(õ	*ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ		.ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ
	.ð �c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ	.ð �c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð  �c˜1˜R˜4  RÐ'Õ(Ñ(õ!	*ð" �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ#	,ð$ �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ%	,ð& �c˜2˜q ˜t RÐ'Õ(Ñ(õ'	*ð( �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ)	,ð* �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ+	,ð, �c˜2˜q ˜t RÐ'Õ(Ñ(õ-	*ð. �c˜2˜r 1 R 4Ð'Õ(Ñ(õ/	*ð0 �c˜2˜r 1 R 4Ð'Õ(Ñ(õ1	*ð2 �oÕ&Ñ&õ3	(ð ð: 
�C˜˜2˜˜q ˜t Q r TÐ)Õ*Ñ	*Ø�c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ	.à�c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ	.ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ		.ð
 �c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  RÐ'Õ(Ñ(õ	*ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ		.ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ
	.ð �c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  2  q¨ tÐ+Õ,Ñ,õ	.ð �c˜1˜R˜4  2  rÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð �c˜1˜R˜4  Q r TÐ)Õ*Ñ*õ	,ð  �c˜1˜R˜4  RÐ'Õ(Ñ(õ!	*ð" �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ#	,ð$ �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ%	,ð& �c˜2˜q ˜t RÐ'Õ(Ñ(õ'	*ð( �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ)	,ð* �c˜2˜q ˜t Q r TÐ)Õ*Ñ*õ+	,ð, �c˜2˜q ˜t RÐ'Õ(Ñ(õ-	*ð. �c˜2˜r 1 R 4Ð'Õ(Ñ(õ/	*ð0 �c˜2˜r 1 R 4Ð'Õ(Ñ(õ1	*ð2 �oÕ&Ñ&õ3	(ð ð8 '-ˆS�!�B�$˜˜"˜˜a ˜dÐ"Ñ#Ø&,ˆS�!�B�$˜˜"˜˜a ˜dÐ"Ñ#ØÐÐr   r�   )r”   Ú
__future__r   Útypingr   r   r   r   Útorch.nn.functionalr   Ú
functionalr2   r   r   r(   r=   rI   ÚModulerK   r™   r¨   r«   r³   r   r   r   Ú<module>r¹      su   ðñ$ Qå "ç #Ñ #ã ß Ð Ý õ"õõBõ$õ<ô@O'˜RŸY™Yô O'ôdl'˜RŸY™Yô l'÷d.A÷b%A÷Pgr   