+
    NV-jw  ã                   ót   € ^ RI t ^ RIHt ^ RIHt ^ RIHt  ! R R]4      t ! R R]4      t	 ! R R	]4      t
R# )
é    N)ÚUnion)ÚModulec                   óR   a a€ ] tR t^
t oRtRV3R lV 3R llltR tR tRtVt	V ;t
# )ÚConv1dan  Applies a 1-dimensional convolution over the multi-channel input sequence.

The channels are expected to be last i.e. the input shape should be ``NLC`` where:

* ``N`` is the batch dimension
* ``L`` is the sequence length
* ``C`` is the number of input channels

Args:
    in_channels (int): The number of input channels
    out_channels (int): The number of output channels
    kernel_size (int): The size of the convolution filters
    stride (int, optional): The stride when applying the filter.
        Default: ``1``.
    padding (int, optional): How many positions to 0-pad the input with.
        Default: ``0``.
    dilation (int, optional): The dilation of the convolution.
    groups (int, optional): The number of groups for the convolution.
        Default: ``1``.
    bias (bool, optional): If ``True`` add a learnable bias to the output.
        Default: ``True``
c                óJ   <€ V ^8„  d   QhRS[ RS[ RS[ RS[ RS[ RS[ RS[ RS[/# ©	é   Úin_channelsÚout_channelsÚkernel_sizeÚstrideÚpaddingÚdilationÚgroupsÚbias)ÚintÚbool)ÚformatÚ__classdict__s   "€Új/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/mlx/nn/layers/convolution.pyÚ__annotate__ÚConv1d.__annotate__"   s[   ø€ ÷ ñ áðñ ðñ ð	ñ
 ðñ ðñ ðñ ðñ ñó    c	                ó€  <€ \         S
V `  4        W,          ^ 8w  d   \        RV RV R24      h\        P                  ! ^W,          ,          4      p	\
        P                  P                  V	) V	W#W,          3R7      V n        V'       d   \
        P                  ! V34      V n
        WPn        W`n        W@n        Wpn        R# )r   úThe number of input channels (ú-) must be divisible by the number of groups (Ú)©ÚlowÚhighÚshapeN)ÚsuperÚ__init__Ú
ValueErrorÚmathÚsqrtÚmxÚrandomÚuniformÚweightÚzerosr   r   r   r   r   ©Úselfr
   r   r   r   r   r   r   r   ÚscaleÚ	__class__s   &&&&&&&&& €r   r#   ÚConv1d.__init__"   s²   ø€ ô 	‰ÑÔàÕ 1Ô$ÜØ0°°ð >6Ø6<°X¸Qð@óð ô
 —	’	˜!˜{Õ8Õ9Ó:ˆÜ—i‘i×'Ñ'Ø�ØØ¨kÕ.CÐDð (ó 
ˆŒ÷
 ÜŸš , Ó1ˆDŒIàŒØ ŒØŒØŽr   c                óN  € V P                   P                  R	,          V P                  ,           RV P                   P                  ^ ,           RV P                   P                  ^,           RV P                   RV P                   RV P
                   RV P                   RRV 9    2# )
é   ú, ú, kernel_size=ú	, stride=ú
, padding=ú, dilation=ú	, groups=ú, bias=r   éÿÿÿÿ©r*   r!   r   r   r   r   ©r-   s   &r   Ú_extra_reprÚConv1d._extra_reprC   s›   € à�{‰{× Ñ  Õ$ t§{¡{Õ2Ð3°2°d·k±k×6GÑ6GÈÕ6JÐ5Kð LØŸ;™;×,Ñ,¨QÕ/Ð0°	¸$¿+¹+¸ð GØ—|‘|�n K°·±¨ð ?Ø—k‘k�]ð #Ø˜d‘NÐ#ð	%ð	
r   c                óÐ   € \         P                  ! WP                  V P                  V P                  V P
                  V P                  4      pR V 9   d   W P                  ,           pV# ©r   )r'   Úconv1dr*   r   r   r   r   r   ©r-   ÚxÚys   && r   Ú__call__ÚConv1d.__call__L   óH   € Ü�IŠIØ�{‰{˜DŸK™K¨¯©°t·}±}ÀdÇkÁkó
ˆð �TŒ>Ø—I‘I•ˆAØˆr   ©r   r   r   r   r   r*   ©r2   r   r2   r2   T©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r#   r=   rE   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r/   r   s   @@r   r   r   
   s$   ù‡ € ñ÷.õ òB
÷ò r   r   c                   óR   a a€ ] tR t^Ut oRtRV3R lV 3R llltR tR tRtVt	V ;t
# )ÚConv2daÃ  Applies a 2-dimensional convolution over the multi-channel input image.

The channels are expected to be last i.e. the input shape should be ``NHWC`` where:

* ``N`` is the batch dimension
* ``H`` is the input image height
* ``W`` is the input image width
* ``C`` is the number of input channels

Args:
    in_channels (int): The number of input channels.
    out_channels (int): The number of output channels.
    kernel_size (int or tuple): The size of the convolution filters.
    stride (int or tuple, optional): The size of the stride when
        applying the filter. Default: ``1``.
    padding (int or tuple, optional): How many positions to 0-pad
        the input with. Default: ``0``.
    dilation (int or tuple, optional): The dilation of the convolution.
    groups (int, optional): The number of groups for the convolution.
        Default: ``1``.
    bias (bool, optional): If ``True`` add a learnable bias to the
        output. Default: ``True``
c                ó¢   <€ V ^8„  d   QhRS[ RS[ RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[ RS[/# r   ©r   r   Útupler   )r   r   s   "€r   r   ÚConv2d.__annotate__n   s   ø€ ÷ #ñ #áð#ñ ð#ñ ™3¡˜:Õ&ð	#ñ
 ‘c™5�jÕ!ð#ñ ‘s™E�zÕ"ð#ñ ™™U˜
Õ#ð#ñ ð#ñ ñ#r   c	                óÖ  <€ \         S
V `  4        W,          ^ 8w  d   \        RV RV R24      h\        R W4V34      w  r4p\        P
                  ! ^W^ ,          ,          V^,          ,          ,          4      p	\        P                  P                  V	) V	V.VOW,          N5R7      V n	        V'       d   \        P                  ! V34      V n        WPn        W@n        W`n        Wpn        R# )r   r   r   r   c                 ó8   € \        V \        4      '       d   W 3# T # ©N©Ú
isinstancer   ©rC   s   &r   Ú<lambda>Ú!Conv2d.__init__.<locals>.<lambda>‚   s   € ¤
¨1¬c× 2Ò 2�q�fÐ9¸Ð9r   r   N)r"   r#   r$   Úmapr%   r&   r'   r(   r)   r*   r+   r   r   r   r   r   r,   s   &&&&&&&&& €r   r#   ÚConv2d.__init__n   sã   ø€ ô 	‰ÑÔàÕ 1Ô$ÜØ0°°ð >6Ø6<°X¸Qð@óð ô
 (+Ù9Ø 'Ð*ó(
Ñ$ˆ˜Wô —	’	˜!˜{¸­^Õ;¸kÈ!½nÕLÕMÓNˆÜ—i‘i×'Ñ'Ø�ØØÐE +ÐE¨{Õ/DÑEð (ó 
ˆŒ÷
 ÜŸš , Ó1ˆDŒIàŒØŒØ ŒØŽr   c                óN  € V P                   P                  R
,          V P                  ,           RV P                   P                  ^ ,           RV P                   P                  R,           RV P                   RV P                   RV P
                   RV P                   RR	V 9    2# )r2   r3   r4   :r2   é   Nr5   r6   r7   r8   r9   r   r:   r;   r<   s   &r   r=   ÚConv2d._extra_repr“   s›   € à�{‰{× Ñ  Õ$ t§{¡{Õ2Ð3°2°d·k±k×6GÑ6GÈÕ6JÐ5Kð LØŸ;™;×,Ñ,¨SÕ1Ð2°)¸D¿K¹K¸=ð IØ—|‘|�n K°·±¨ð ?Ø—k‘k�]ð #Ø˜d‘NÐ#ð	%ð	
r   c                óÐ   € \         P                  ! WP                  V P                  V P                  V P
                  V P                  4      pR V 9   d   W P                  ,           pV# r@   )r'   Úconv2dr*   r   r   r   r   r   rB   s   && r   rE   ÚConv2d.__call__œ   rG   r   rH   rI   rJ   rS   s   @@r   rU   rU   U   s$   ù‡ € ñ÷0#õ #òJ
÷ò r   rU   c                   óR   a a€ ] tR t^¥t oRtRV3R lV 3R llltR tR tRtVt	V ;t
# )ÚConv3da‡  Applies a 3-dimensional convolution over the multi-channel input image.

The channels are expected to be last i.e. the input shape should be ``NDHWC`` where:

* ``N`` is the batch dimension
* ``D`` is the input image depth
* ``H`` is the input image height
* ``W`` is the input image width
* ``C`` is the number of input channels

Args:
    in_channels (int): The number of input channels.
    out_channels (int): The number of output channels.
    kernel_size (int or tuple): The size of the convolution filters.
    stride (int or tuple, optional): The size of the stride when
        applying the filter. Default: ``1``.
    dilation (int or tuple, optional): The dilation of the convolution.
    padding (int or tuple, optional): How many positions to 0-pad
        the input with. Default: ``0``.
    bias (bool, optional): If ``True`` add a learnable bias to the
        output. Default: ``True``
c                óœ   <€ V ^8„  d   QhRS[ RS[ RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[/# )r	   r
   r   r   r   r   r   r   rW   )r   r   s   "€r   r   ÚConv3d.__annotate__½   su   ø€ ÷ !ñ !áð!ñ ð!ñ ™3¡˜:Õ&ð	!ñ
 ‘c™5�jÕ!ð!ñ ‘s™E�zÕ"ð!ñ ™™U˜
Õ#ð!ñ ñ!r   c                óœ  <€ \         S	V `  4        \        R  W4V34      w  r4p\        P                  ! ^W^ ,          ,          V^,          ,          V^,          ,          ,          4      p\
        P                  P                  V) VV.VOVN5R7      V n        V'       d   \
        P                  ! V34      V n
        WPn        W@n        W`n        R# )c                 ó:   € \        V \        4      '       d   W V 3# T # r\   r]   r_   s   &r   r`   Ú!Conv3d.__init__.<locals>.<lambda>Ê   s   € ¤:¨a´×#5Ò#5�q˜Q�iÐ<¸1Ð<r   r   N)r"   r#   rb   r%   r&   r'   r(   r)   r*   r+   r   r   r   r   )
r-   r
   r   r   r   r   r   r   r.   r/   s
   &&&&&&&& €r   r#   ÚConv3d.__init__½   s¶   ø€ ô 	‰ÑÔä'*Ù<Ø 'Ð*ó(
Ñ$ˆ˜Wô —	’	Ø�¨1�~Õ-°¸AµÕ>ÀÈQÅÕOÕPó
ˆô —i‘i×'Ñ'Ø�ØØÐ; +Ð;¨{Ñ;ð (ó 
ˆŒ÷
 ÜŸš , Ó1ˆDŒIàŒØŒØ Žr   c                ó4  € V P                   P                  R	,          V P                  ,           RV P                   P                  ^ ,           RV P                   P                  R,           RV P                   RV P                   RV P
                   RRV 9    2# )
r2   r3   r4   :r2   é   Nr5   r6   r7   r9   r   r:   r;   r<   s   &r   r=   ÚConv3d._extra_reprÜ   s�   € à�{‰{× Ñ  Õ$ t§{¡{Õ2Ð3°2°d·k±k×6GÑ6GÈÕ6JÐ5Kð LØŸ;™;×,Ñ,¨SÕ1Ð2°)¸D¿K¹K¸=ð IØ—|‘|�n K°·±¨ð ?Ø˜d‘NÐ#ð%ð	
r   c                óº   € \         P                  ! WP                  V P                  V P                  V P
                  4      pR V 9   d   W P                  ,           pV# r@   )r'   Úconv3dr*   r   r   r   r   rB   s   && r   rE   ÚConv3d.__call__ä   s=   € Ü�IŠI�aŸ™ d§k¡k°4·<±<ÀÇÁÓOˆØ�TŒ>Ø—I‘I•ˆAØˆr   )r   r   r   r   r*   )r2   r   r2   TrJ   rS   s   @@r   rk   rk   ¥   s#   ù‡ € ñ÷.!õ !ò>
÷ò r   rk   )r%   Útypingr   Úmlx.coreÚcorer'   Úmlx.nn.layers.baser   r   rU   rk   © r   r   Ú<module>r}      s?   ðó Ý å Ý %ôHˆVô HôVMˆVô Mô`CˆVö Cr   